summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Kügler <[email protected]>2017-05-05 19:32:23 +0200
committerSebastian Kügler <[email protected]>2017-05-05 19:35:16 +0200
commitc84a79322f99773482a5d1f7da1f63550cc3711f (patch)
tree872e29b5e599a3c88b2a6468c2f5166546381bee
parent1817f35b3ccaf41f48c7622d2464c8e9f86186d4 (diff)
Allow to switch between monochrome and full-color icons
Add a checkbox to allow switching between the normal rendering of icons and Plasma's way of overriding the icon rendering (usually with monochrome icons). This doesn't seem to work yet, but we'll need to fix it elsewhere. As requested by the venerable Ken Vermette.
-rw-r--r--cuttlefish/package/contents/ui/IconGridDelegate.qml1
-rw-r--r--cuttlefish/package/contents/ui/Preview.qml6
-rw-r--r--cuttlefish/package/contents/ui/Tools.qml12
-rw-r--r--cuttlefish/package/contents/ui/cuttlefish.qml1
4 files changed, 19 insertions, 1 deletions
diff --git a/cuttlefish/package/contents/ui/IconGridDelegate.qml b/cuttlefish/package/contents/ui/IconGridDelegate.qml
index b8ec0ca..df8f23a 100644
--- a/cuttlefish/package/contents/ui/IconGridDelegate.qml
+++ b/cuttlefish/package/contents/ui/IconGridDelegate.qml
@@ -64,6 +64,7 @@ MouseArea {
width: iconSize
height: width
source: iconName
+ usesPlasmaTheme: cuttlefish.usesPlasmaTheme
colorGroup: PlasmaCore.ColorScope.colorGroup
anchors {
top: parent.top
diff --git a/cuttlefish/package/contents/ui/Preview.qml b/cuttlefish/package/contents/ui/Preview.qml
index 91dbd2b..481988d 100644
--- a/cuttlefish/package/contents/ui/Preview.qml
+++ b/cuttlefish/package/contents/ui/Preview.qml
@@ -92,30 +92,36 @@ Rectangle {
PlasmaCore.IconItem {
source: iconName
+ usesPlasmaTheme: cuttlefish.usesPlasmaTheme
colorGroup: PlasmaCore.ColorScope.colorGroup
Layout.preferredWidth: indexToSize(0)
Layout.preferredHeight: indexToSize(0)
}
PlasmaCore.IconItem {
source: iconName
+ usesPlasmaTheme: cuttlefish.usesPlasmaTheme
colorGroup: PlasmaCore.ColorScope.colorGroup
Layout.preferredWidth: indexToSize(1)
Layout.preferredHeight: indexToSize(1)
}
PlasmaCore.IconItem {
source: iconName
+ usesPlasmaTheme: cuttlefish.usesPlasmaTheme
colorGroup: PlasmaCore.ColorScope.colorGroup
Layout.preferredWidth: indexToSize(2)
Layout.preferredHeight: indexToSize(2)
}
PlasmaCore.IconItem {
source: iconName
+ usesPlasmaTheme: cuttlefish.usesPlasmaTheme
+ onUsesPlasmaThemeChanged: print("PlasmaTHeme? " + (cuttlefish.usesPlasmaTheme ? "true" : "false"))
colorGroup: PlasmaCore.ColorScope.colorGroup
Layout.preferredWidth: indexToSize(3)
Layout.preferredHeight: indexToSize(3)
}
PlasmaCore.IconItem {
source: iconName
+ usesPlasmaTheme: cuttlefish.usesPlasmaTheme
colorGroup: PlasmaCore.ColorScope.colorGroup
Layout.preferredWidth: indexToSize(4)
Layout.preferredHeight: indexToSize(4)
diff --git a/cuttlefish/package/contents/ui/Tools.qml b/cuttlefish/package/contents/ui/Tools.qml
index 4224995..b2ec045 100644
--- a/cuttlefish/package/contents/ui/Tools.qml
+++ b/cuttlefish/package/contents/ui/Tools.qml
@@ -127,10 +127,20 @@ PlasmaComponents.ToolBar {
PlasmaComponents.CheckBox {
id: colorContextCheckbox
- text: i18n("Inverted Color Scheme")
+ text: i18n("Inverted Colors")
onCheckedChanged: darkScheme = checked
}
+ PlasmaComponents.CheckBox {
+ id: plasmaThemeCheckbox
+ text: i18n("Monochrome")
+ checked: true
+ onCheckedChanged: {
+ print("now?" + (checked ? "Checked" : "Unchecked"))
+ cuttlefish.usesPlasmaTheme = checked
+ }
+ }
+
Item {
Layout.preferredWidth: preview.width
}
diff --git a/cuttlefish/package/contents/ui/cuttlefish.qml b/cuttlefish/package/contents/ui/cuttlefish.qml
index 23a42f6..5da5f83 100644
--- a/cuttlefish/package/contents/ui/cuttlefish.qml
+++ b/cuttlefish/package/contents/ui/cuttlefish.qml
@@ -35,6 +35,7 @@ Item {
property int iconSize: units.iconSizes.large
property bool hoveredHighlight: false
property bool darkScheme: false
+ property bool usesPlasmaTheme: true
id: cuttlefish
objectName: "cuttlefish"