Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions contents/config/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@
<label>Colorize task buttons</label>
<default>false</default>
</entry>
<entry name="buttonColorizeInactive" type="Bool">
<label>Colorize inactive task buttons</label>
<default>false</default>
</entry>
<entry name="buttonColorizeDominant" type="Bool">
<label>Make the task button use the icon's dominant color</label>
<default>true</default>
Expand Down
14 changes: 13 additions & 1 deletion contents/ui/AudioStream.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
import QtQuick 2.15

import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kirigami 2.20 as Kirigami
import QtGraphicalEffects 1.15

MouseArea {
property string dominantIconColor
id: audioStreamIconBox
hoverEnabled: true
onClicked: toggleMuted()
Expand Down Expand Up @@ -80,12 +83,21 @@ MouseArea {
visible: opacity > 0

PlasmaCore.FrameSvgItem {
id: audioStreamFrame
anchors.fill: audioStreamIcon
visible: parent.containsMouse
visible: parent.containsMouse && !plasmoid.configuration.buttonColorize ? true : false
imagePath: "widgets/viewitem"
prefix: "hover"
}

ColorOverlay {
id: colorOverrideAudio
anchors.fill: audioStreamFrame
source: audioStreamFrame
color: plasmoid.configuration.buttonColorizeDominant ? dominantIconColor : plasmoid.configuration.buttonColorizeCustom
visible: parent.containsMouse && plasmoid.configuration.buttonColorize ? true : false
}

PlasmaCore.Svg {
id: audioSvg
imagePath: "icons/audio"
Expand Down
9 changes: 9 additions & 0 deletions contents/ui/ConfigAppearance.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Kirigami.FormLayout {
property alias cfg_taskSpacingSize: taskSpacingSize.value

property alias cfg_buttonColorize: buttonColorize.checked
property alias cfg_buttonColorizeInactive: buttonColorizeInactive.checked
property alias cfg_buttonColorizeDominant: buttonColorizeDominant.checked
property alias cfg_buttonColorizeCustom: buttonColorizeCustom.color

Expand Down Expand Up @@ -80,6 +81,14 @@ Kirigami.FormLayout {
text: i18n("Colorize buttons")
}

RowLayout {
Item { implicitWidth: Kirigami.Units.gridUnit }
CheckBox {
id: buttonColorizeInactive
text: i18n("Colorize inactive buttons")
}
}

CheckBox {
enabled: buttonColorize.checked
id: buttonColorizeDominant
Expand Down
Loading