diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-08-30 15:20:16 +0200 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-08-30 15:20:16 +0200 |
commit | 2180926301a6417b8dd06dba9d65a337d3e91db1 (patch) | |
tree | c50ed4042e527474cca7254e179927da5afd8583 | |
parent | d171a3b185565c75b4fa55d114f645c7dc8f91d8 (diff) | |
download | kube-2180926301a6417b8dd06dba9d65a337d3e91db1.tar.gz kube-2180926301a6417b8dd06dba9d65a337d3e91db1.zip |
invert scrollbar colors in folder view
-rw-r--r-- | framework/qml/ScrollBar.qml | 9 | ||||
-rw-r--r-- | framework/qml/TreeView.qml | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/framework/qml/ScrollBar.qml b/framework/qml/ScrollBar.qml index 5d484614..aa324cd3 100644 --- a/framework/qml/ScrollBar.qml +++ b/framework/qml/ScrollBar.qml | |||
@@ -21,7 +21,10 @@ import QtQuick.Templates 2.0 as T | |||
21 | import org.kube.framework 1.0 as Kube | 21 | import org.kube.framework 1.0 as Kube |
22 | 22 | ||
23 | T.ScrollBar { | 23 | T.ScrollBar { |
24 | id: control | 24 | id: root |
25 | |||
26 | property bool invertedColors: false | ||
27 | |||
25 | 28 | ||
26 | implicitWidth: contentItem.implicitWidth | 29 | implicitWidth: contentItem.implicitWidth |
27 | implicitHeight: contentItem.implicitHeight | 30 | implicitHeight: contentItem.implicitHeight |
@@ -32,13 +35,13 @@ T.ScrollBar { | |||
32 | implicitWidth: Kube.Units.gridUnit / 3 | 35 | implicitWidth: Kube.Units.gridUnit / 3 |
33 | implicitHeight: Kube.Units.gridUnit / 3 | 36 | implicitHeight: Kube.Units.gridUnit / 3 |
34 | 37 | ||
35 | color: Kube.Colors.disabledTextColor | 38 | color: root.invertedColors ? Kube.Colors.buttonColor : Kube.Colors.disabledTextColor |
36 | } | 39 | } |
37 | 40 | ||
38 | background: Rectangle { | 41 | background: Rectangle { |
39 | implicitWidth: Kube.Units.gridUnit / 3 | 42 | implicitWidth: Kube.Units.gridUnit / 3 |
40 | implicitHeight: Kube.Units.gridUnit / 3 | 43 | implicitHeight: Kube.Units.gridUnit / 3 |
41 | 44 | ||
42 | color: Kube.Colors.buttonColor | 45 | color: root.invertedColors ? Kube.Colors.disabledTextColor : Kube.Colors.buttonColor |
43 | } | 46 | } |
44 | } | 47 | } |
diff --git a/framework/qml/TreeView.qml b/framework/qml/TreeView.qml index d53497af..eb140514 100644 --- a/framework/qml/TreeView.qml +++ b/framework/qml/TreeView.qml | |||
@@ -47,7 +47,7 @@ FocusScope { | |||
47 | 47 | ||
48 | anchors.fill: parent | 48 | anchors.fill: parent |
49 | 49 | ||
50 | Controls2.ScrollBar.vertical: Kube.ScrollBar {} | 50 | Controls2.ScrollBar.vertical: Kube.ScrollBar { invertedColors: true } |
51 | clip: true | 51 | clip: true |
52 | contentWidth: root.width | 52 | contentWidth: root.width |
53 | contentHeight: treeView.implicitHeight | 53 | contentHeight: treeView.implicitHeight |