aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/imagine/ScrollBar.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/imagine/ScrollBar.qml')
-rw-r--r--src/imports/controls/imagine/ScrollBar.qml25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/imports/controls/imagine/ScrollBar.qml b/src/imports/controls/imagine/ScrollBar.qml
index 49c8d1f0..b7acf416 100644
--- a/src/imports/controls/imagine/ScrollBar.qml
+++ b/src/imports/controls/imagine/ScrollBar.qml
@@ -34,18 +34,18 @@
**
****************************************************************************/
-import QtQuick 2.11
-import QtQuick.Templates 2.4 as T
-import QtQuick.Controls.Imagine 2.4
-import QtQuick.Controls.Imagine.impl 2.4
+import QtQuick 2.12
+import QtQuick.Templates 2.5 as T
+import QtQuick.Controls.Imagine 2.5
+import QtQuick.Controls.Imagine.impl 2.5
T.ScrollBar {
id: control
- implicitWidth: Math.max(background ? background.implicitWidth : 0,
- contentItem.implicitWidth + leftPadding + rightPadding)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
- contentItem.implicitHeight + topPadding + bottomPadding)
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding)
visible: control.policy !== T.ScrollBar.AlwaysOff
@@ -54,6 +54,11 @@ T.ScrollBar {
rightPadding: background ? background.rightPadding : 0
bottomPadding: background ? background.bottomPadding : 0
+ topInset: background ? -background.topInset || 0 : 0
+ leftInset: background ? -background.leftInset || 0 : 0
+ rightInset: background ? -background.rightInset || 0 : 0
+ bottomInset: background ? -background.bottomInset || 0 : 0
+
contentItem: NinePatchImage {
width: control.availableWidth
height: control.availableHeight
@@ -74,10 +79,6 @@ T.ScrollBar {
}
background: NinePatchImage {
- x: -leftInset; y: -topInset
- width: control.width + leftInset + rightInset
- height: control.height + topInset + bottomInset
-
source: Imagine.url + "scrollbar-background"
NinePatchImageSelector on source {
states: [