mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 21:45:38 -05:00
fix cpu burning of privacy indicator
This commit is contained in:
@@ -20,6 +20,7 @@ Rectangle {
|
|||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
visible: hasActivePrivacy
|
visible: hasActivePrivacy
|
||||||
opacity: hasActivePrivacy ? 1 : 0
|
opacity: hasActivePrivacy ? 1 : 0
|
||||||
|
enabled: hasActivePrivacy
|
||||||
|
|
||||||
color: Qt.rgba(
|
color: Qt.rgba(
|
||||||
privacyArea.containsMouse ? Theme.errorPressed.r : Theme.errorHover.r,
|
privacyArea.containsMouse ? Theme.errorPressed.r : Theme.errorHover.r,
|
||||||
@@ -32,7 +33,8 @@ Rectangle {
|
|||||||
id: privacyArea
|
id: privacyArea
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: hasActivePrivacy
|
||||||
|
enabled: hasActivePrivacy
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
||||||
@@ -84,7 +86,8 @@ Rectangle {
|
|||||||
anchors.topMargin: -1
|
anchors.topMargin: -1
|
||||||
|
|
||||||
SequentialAnimation on opacity {
|
SequentialAnimation on opacity {
|
||||||
running: parent.visible && hasActivePrivacy
|
id: pulseAnimation
|
||||||
|
running: parent.visible && hasActivePrivacy && PrivacyService.cameraActive
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
|
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
@@ -116,7 +119,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on width {
|
Behavior on width {
|
||||||
enabled: hasActivePrivacy
|
enabled: hasActivePrivacy && visible
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Theme.mediumDuration
|
duration: Theme.mediumDuration
|
||||||
easing.type: Theme.emphasizedEasing
|
easing.type: Theme.emphasizedEasing
|
||||||
@@ -148,7 +151,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
enabled: hasActivePrivacy
|
enabled: hasActivePrivacy && root.visible
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Theme.shortDuration
|
duration: Theme.shortDuration
|
||||||
easing.type: Theme.standardEasing
|
easing.type: Theme.standardEasing
|
||||||
|
|||||||
Reference in New Issue
Block a user