aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/imagine
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-02-25 13:32:54 +0100
committerMitch Curtis <mitch.curtis@qt.io>2020-03-02 14:33:59 +0100
commit1f7959d3dd5942fe7f7553bba16583c37a4969a8 (patch)
treeb988fc7729cf4de219cbb7c91a3d7425933d626d /src/imports/controls/imagine
parent35afc8d21b2f705463ec56d3e11679efb798b757 (diff)
Imagine: fix Dial being squished
- Since we probably don't want to wrap the background in an Item, use "fillMode: Image.PreserveAspectFit" on it to ensure that the background isn't squished. - Use the same binding for the Translate's y property as we do in all of the other styles. Fixes: QTBUG-82463 Change-Id: I43129959e03ad489a8c231a7a42c192264b380ac Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/imports/controls/imagine')
-rw-r--r--src/imports/controls/imagine/Dial.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/imports/controls/imagine/Dial.qml b/src/imports/controls/imagine/Dial.qml
index f10634e6..f8c394f3 100644
--- a/src/imports/controls/imagine/Dial.qml
+++ b/src/imports/controls/imagine/Dial.qml
@@ -74,7 +74,7 @@ T.Dial {
transform: [
Translate {
- y: -background.height * 0.4 + handle.height / 2
+ y: -Math.min(control.background.width, control.background.height) * 0.4 + control.handle.height / 2
},
Rotation {
angle: control.angle
@@ -89,6 +89,7 @@ T.Dial {
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 {