From 2180926301a6417b8dd06dba9d65a337d3e91db1 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Wed, 30 Aug 2017 15:20:16 +0200 Subject: invert scrollbar colors in folder view --- framework/qml/ScrollBar.qml | 9 ++++++--- framework/qml/TreeView.qml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'framework') 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 import org.kube.framework 1.0 as Kube T.ScrollBar { - id: control + id: root + + property bool invertedColors: false + implicitWidth: contentItem.implicitWidth implicitHeight: contentItem.implicitHeight @@ -32,13 +35,13 @@ T.ScrollBar { implicitWidth: Kube.Units.gridUnit / 3 implicitHeight: Kube.Units.gridUnit / 3 - color: Kube.Colors.disabledTextColor + color: root.invertedColors ? Kube.Colors.buttonColor : Kube.Colors.disabledTextColor } background: Rectangle { implicitWidth: Kube.Units.gridUnit / 3 implicitHeight: Kube.Units.gridUnit / 3 - color: Kube.Colors.buttonColor + color: root.invertedColors ? Kube.Colors.disabledTextColor : Kube.Colors.buttonColor } } 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 { anchors.fill: parent - Controls2.ScrollBar.vertical: Kube.ScrollBar {} + Controls2.ScrollBar.vertical: Kube.ScrollBar { invertedColors: true } clip: true contentWidth: root.width contentHeight: treeView.implicitHeight -- cgit v1.2.3