Skip to content

Commit 9de6729

Browse files
committed
feat: option to hide the green checkmark when no updates #142
1 parent b6b6788 commit 9de6729

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

package/contents/config/main.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
<group name="Appearance">
6161
<entry name="relevantIcon" type="int"><default>0</default></entry>
6262
<entry name="selectedIcon" type="string"><default>apdatifier-plasmoid</default></entry>
63-
<entry name="indicatorStop" type="bool"><default>true</default></entry>
63+
<entry name="badgePaused" type="bool"><default>true</default></entry>
64+
<entry name="badgeUpdated" type="bool"><default>true</default></entry>
6465
<entry name="counterEnabled" type="bool"><default>true</default></entry>
6566
<entry name="counterOnLeft" type="bool"><default>false</default></entry>
6667
<entry name="counterColor" type="string"><default></default></entry>

package/contents/ui/configuration/Appearance.qml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import "../../tools/tools.js" as JS
2020
SimpleKCM {
2121
property alias cfg_relevantIcon: relevantIcon.value
2222
property string cfg_selectedIcon: plasmoid.configuration.selectedIcon
23-
property alias cfg_indicatorStop: indicatorStop.checked
23+
property alias cfg_badgePaused: badgePaused.checked
24+
property alias cfg_badgeUpdated: badgeUpdated.checked
2425
property alias cfg_counterEnabled: counterEnabled.checked
2526
property alias cfg_counterOnLeft: counterOnLeft.checked
2627
property string cfg_counterColor: plasmoid.configuration.counterColor
@@ -189,8 +190,14 @@ SimpleKCM {
189190
}
190191

191192
CheckBox {
192-
Kirigami.FormData.label: i18n("Stopped interval") + ":"
193-
id: indicatorStop
193+
Kirigami.FormData.label: i18n("Pause badge") + ":"
194+
id: badgePaused
195+
text: i18n("Enable")
196+
}
197+
198+
CheckBox {
199+
Kirigami.FormData.label: i18n("Updated badge") + ":"
200+
id: badgeUpdated
194201
text: i18n("Enable")
195202
}
196203

package/contents/ui/main.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ PlasmoidItem {
5454
property bool idle: !busy && !err
5555
property bool updated: idle && !count
5656
property bool pending: idle && count
57-
property bool paused: idle && cfg.indicatorStop && !cfg.interval
57+
property bool paused: idle && !cfg.interval
5858
property string errMsg: ""
5959
property string statusMsg: ""
6060
property string statusIco: ""

package/contents/ui/representation/Expanded.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Representation {
129129
source: cfg.ownIconsUI
130130
? (cfg.interval ? svg("toolbar_pause") : svg("toolbar_start"))
131131
: (cfg.interval ? "media-playback-paused" : "media-playback-playing")
132-
color: !cfg.interval && !cfg.indicatorStop ? Kirigami.Theme.negativeTextColor : Kirigami.Theme.colorSet
132+
color: !cfg.interval && !cfg.badgePaused ? Kirigami.Theme.negativeTextColor : Kirigami.Theme.colorSet
133133
scale: cfg.ownIconsUI ? 0.7 : 0.9
134134
isMask: cfg.ownIconsUI
135135
smooth: true

package/contents/ui/representation/Panel.qml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ MouseArea {
101101
QQC.Badge {
102102
iconName: updatedIcon
103103
iconColor: Kirigami.Theme.positiveTextColor
104-
visible: sts.updated
104+
visible: sts.updated && cfg.badgeUpdated
105105
}
106106
QQC.Badge {
107107
iconName: pausedIcon
108108
iconColor: Kirigami.Theme.neutralTextColor
109-
visible: sts.paused
109+
visible: sts.paused && cfg.badgePaused
110110
}
111111
}
112112
}
@@ -194,11 +194,11 @@ MouseArea {
194194
QQC.Badge {
195195
iconName: updatedIcon
196196
iconColor: Kirigami.Theme.positiveTextColor
197-
visible: counterOverlay && sts.updated
197+
visible: counterOverlay && sts.updated && cfg.badgeUpdated
198198
}
199199
QQC.Badge {
200200
iconName: pausedIcon
201201
iconColor: Kirigami.Theme.neutralTextColor
202-
visible: counterOverlay && sts.paused
202+
visible: counterOverlay && sts.paused && cfg.badgePaused
203203
}
204204
}

0 commit comments

Comments
 (0)