diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2021-08-31 15:43:48 +0300 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2021-08-31 16:58:05 +0000 |
commit | c8d1f32e761e1520084edbcda625c8390ed6cce8 (patch) | |
tree | b116914dac83be0bc23b02ba64351873c47a032b /src/plugins/studiowelcome/qml | |
parent | 40217517b840ed3acf7c4fc4aeb700daefca739f (diff) |
QmlDesigner: Improve Welcome screen scollbar
- scroll bar only visible when needed
- change color when active
- remove useless stuff
- remove 3 warnings
Change-Id: I0fbab4ca574c060f85adb0d5b6b54381337a7eae
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/studiowelcome/qml')
-rw-r--r-- | src/plugins/studiowelcome/qml/welcomepage/CustomScrollBar.qml | 15 | ||||
-rw-r--r-- | src/plugins/studiowelcome/qml/welcomepage/CustomScrollView.qml | 5 |
2 files changed, 6 insertions, 14 deletions
diff --git a/src/plugins/studiowelcome/qml/welcomepage/CustomScrollBar.qml b/src/plugins/studiowelcome/qml/welcomepage/CustomScrollBar.qml index f372165a78..a6042e24cc 100644 --- a/src/plugins/studiowelcome/qml/welcomepage/CustomScrollBar.qml +++ b/src/plugins/studiowelcome/qml/welcomepage/CustomScrollBar.qml @@ -35,23 +35,20 @@ Controls.ScrollBar { implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) - padding: control.interactive ? 1 : 2 - visible: control.policy !== Controls.ScrollBar.AlwaysOff - minimumSize: orientation == Qt.Horizontal ? height / width : width / height + padding: active ? 1 : 2 + visible: orientation === Qt.Horizontal ? contentWidth > width : contentHeight > height + minimumSize: orientation === Qt.Horizontal ? height / width : width / height contentItem: Rectangle { implicitWidth: 13 implicitHeight: 13 - - color: Constants.textDefaultColor + color: active ? Constants.textHoverColor : Constants.textDefaultColor } background: Rectangle { implicitWidth: 16 implicitHeight: 16 - color: "#2d2e30" - visible: control.interactive + color: "#3b3c3d" + visible: active } } - - diff --git a/src/plugins/studiowelcome/qml/welcomepage/CustomScrollView.qml b/src/plugins/studiowelcome/qml/welcomepage/CustomScrollView.qml index a440cc68af..0fbdfa9f00 100644 --- a/src/plugins/studiowelcome/qml/welcomepage/CustomScrollView.qml +++ b/src/plugins/studiowelcome/qml/welcomepage/CustomScrollView.qml @@ -33,10 +33,5 @@ Controls.ScrollView { x: control.mirrored ? 0 : control.width - width y: control.topPadding height: control.availableHeight - active: control.ScrollBar.horizontal.active - } - - Controls.ScrollBar.horizontal: CustomScrollBar { - visible: false } } |