summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/qml/ScrollBar.qml9
-rw-r--r--framework/qml/TreeView.qml2
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
21import org.kube.framework 1.0 as Kube 21import org.kube.framework 1.0 as Kube
22 22
23T.ScrollBar { 23T.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