File tree Expand file tree Collapse file tree 4 files changed +241
-191
lines changed Expand file tree Collapse file tree 4 files changed +241
-191
lines changed Original file line number Diff line number Diff line change 212212 <label >Colorize task buttons</label >
213213 <default >false</default >
214214 </entry >
215+ <entry name =" buttonColorizeInactive" type =" Bool" >
216+ <label >Colorize inactive task buttons</label >
217+ <default >false</default >
218+ </entry >
215219 <entry name =" buttonColorizeDominant" type =" Bool" >
216220 <label >Make the task button use the icon's dominant color</label >
217221 <default >true</default >
Original file line number Diff line number Diff line change 77import QtQuick 2.15
88
99import org.kde.plasma.core 2.0 as PlasmaCore
10+ import org.kde.kirigami 2.20 as Kirigami
11+ import QtGraphicalEffects 1.15
1012
1113MouseArea {
14+ property string dominantIconColor
1215 id: audioStreamIconBox
1316 hoverEnabled: true
1417 onClicked: toggleMuted ()
@@ -80,12 +83,21 @@ MouseArea {
8083 visible: opacity > 0
8184
8285 PlasmaCore .FrameSvgItem {
86+ id: audioStreamFrame
8387 anchors .fill : audioStreamIcon
84- visible: parent .containsMouse
88+ visible: parent .containsMouse && ! plasmoid . configuration . buttonColorize ? true : false
8589 imagePath: " widgets/viewitem"
8690 prefix: " hover"
8791 }
8892
93+ ColorOverlay {
94+ id: colorOverrideAudio
95+ anchors .fill : audioStreamFrame
96+ source: audioStreamFrame
97+ color: plasmoid .configuration .buttonColorizeDominant ? dominantIconColor : plasmoid .configuration .buttonColorizeCustom
98+ visible: parent .containsMouse && plasmoid .configuration .buttonColorize ? true : false
99+ }
100+
89101 PlasmaCore .Svg {
90102 id: audioSvg
91103 imagePath: " icons/audio"
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ Kirigami.FormLayout {
3434 property alias cfg_taskSpacingSize: taskSpacingSize .value
3535
3636 property alias cfg_buttonColorize: buttonColorize .checked
37+ property alias cfg_buttonColorizeInactive: buttonColorizeInactive .checked
3738 property alias cfg_buttonColorizeDominant: buttonColorizeDominant .checked
3839 property alias cfg_buttonColorizeCustom: buttonColorizeCustom .color
3940
@@ -80,6 +81,14 @@ Kirigami.FormLayout {
8081 text: i18n (" Colorize buttons" )
8182 }
8283
84+ RowLayout {
85+ Item { implicitWidth: Kirigami .Units .gridUnit }
86+ CheckBox {
87+ id: buttonColorizeInactive
88+ text: i18n (" Colorize inactive buttons" )
89+ }
90+ }
91+
8392 CheckBox {
8493 enabled: buttonColorize .checked
8594 id: buttonColorizeDominant
You can’t perform that action at this time.
0 commit comments