aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Eftevaag <oliver.eftevaag@qt.io>2022-01-20 15:29:35 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-27 05:21:27 +0000
commit81ee41d0eb549c550f2910b49d92f1561993af1c (patch)
tree908b8ad1459eb29848d60ed65a310851a1cc5635
parent87608d2776c642347c75652ec9987395cd42ffb1 (diff)
Imagine Dial: remove unnecessary bindings for background size
It's unnecessary to explicitly set the width and height for the background, since it will get resized anyway in QQuickControlPrivate::resizeBackground(). The fillMode will already ensure that the NinePatchImage is scaled uniformly. This patch also fixes an issue with the QQuickDial not positioning the handle correctly with the Imagine style. Fixes: QTBUG-100089 Change-Id: Icc3716df6d83df78f526ef77cc60d007c2c38f12 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit dd55dc7e3d20d12af333731448346a58b5d0ba19) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quickcontrols2/imagine/Dial.qml5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/quickcontrols2/imagine/Dial.qml b/src/quickcontrols2/imagine/Dial.qml
index 4dc5865415..686f889053 100644
--- a/src/quickcontrols2/imagine/Dial.qml
+++ b/src/quickcontrols2/imagine/Dial.qml
@@ -88,12 +88,7 @@ T.Dial {
}
background: NinePatchImage {
- x: control.width / 2 - width / 2
- y: control.height / 2 - height / 2
- width: Math.max(64, Math.min(control.width, control.height))
- height: width
fillMode: Image.PreserveAspectFit
-
source: Imagine.url + "dial-background"
NinePatchImageSelector on source {
states: [