From cbeeb07e6bf9a8e0ba46fcda7c89fb5301a88112 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 26 Nov 2020 15:56:40 -0800 Subject: [PATCH] Themeable Scrollbars - make scrollbars more visible --- ScrollBar.qml | 7 ++++--- theme/CwtchDark.qml | 3 +++ theme/CwtchLight.qml | 3 +++ theme/Theme.qml | 3 +++ theme/ThemeType.qml | 3 +++ 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ScrollBar.qml b/ScrollBar.qml index 24fe8f5..59f982d 100644 --- a/ScrollBar.qml +++ b/ScrollBar.qml @@ -10,8 +10,8 @@ import "../const" T.ScrollBar { - palette.dark: Theme.defaultButtonColor - palette.mid: Theme.dividerColor + palette.dark: Theme.scrollbarDefaultColor + palette.mid: Theme.scrollbarActiveColor id: control @@ -20,6 +20,7 @@ T.ScrollBar { implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) + width: 10 padding: 2 visible: control.policy !== T.ScrollBar.AlwaysOff && control.size < 1.0 @@ -28,7 +29,7 @@ T.ScrollBar { implicitHeight: control.interactive ? 6 : 2 radius: width / 2 - color: control.pressed ? control.palette.dark : control.palette.mid + color: control.pressed ? control.palette.mid : control.palette.dark opacity: 1.0 } } diff --git a/theme/CwtchDark.qml b/theme/CwtchDark.qml index 870ef8d..b84305d 100644 --- a/theme/CwtchDark.qml +++ b/theme/CwtchDark.qml @@ -38,6 +38,9 @@ ThemeType { textfieldButtonColor: purple textfieldButtonTextColor: darkGreyPurple + scrollbarDefaultColor: purple + scrollbarActiveColor: hotPink + portraitOnlineBorderColor: whitePurple portraitOnlineBackgroundColor: whitePurple portraitOnlineTextColor: whitePurple diff --git a/theme/CwtchLight.qml b/theme/CwtchLight.qml index 2d2fddd..0c99f0d 100644 --- a/theme/CwtchLight.qml +++ b/theme/CwtchLight.qml @@ -39,6 +39,9 @@ ThemeType { textfieldButtonColor: hotPink textfieldButtonTextColor: whitePurple + scrollbarDefaultColor: darkPurple + scrollbarActiveColor: hotPink + portraitOnlineBorderColor: darkPurple portraitOnlineBackgroundColor: darkPurple portraitOnlineTextColor: darkPurple diff --git a/theme/Theme.qml b/theme/Theme.qml index 2eff68b..af18a14 100644 --- a/theme/Theme.qml +++ b/theme/Theme.qml @@ -90,6 +90,9 @@ Item { readonly property color messageStatusAlertColor: theme.messageStatusAlertColor readonly property color messageStatusAlertTextColor: theme.messageStatusAlertTextColor + readonly property color scrollbarDefaultColor: theme.scrollbarDefaultColor + readonly property color scrollbarActiveColor: theme.scrollbarActiveColor + readonly property int headerSize: 50 readonly property int subHeaderSize: 35 readonly property int usernameSize: 30 diff --git a/theme/ThemeType.qml b/theme/ThemeType.qml index 212b360..47d3c52 100644 --- a/theme/ThemeType.qml +++ b/theme/ThemeType.qml @@ -28,6 +28,9 @@ QtObject { property color textfieldButtonColor: "red" property color textfieldButtonTextColor: "red" + property color scrollbarDefaultColor: "red" + property color scrollbarActiveColor: "red" + property color portraitOnlineBorderColor: "red" property color portraitOnlineBackgroundColor: "red" property color portraitOnlineTextColor: "red"