From 1f7959d3dd5942fe7f7553bba16583c37a4969a8 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 25 Feb 2020 13:32:54 +0100 Subject: 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 --- src/imports/controls/imagine/Dial.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/imports/controls/imagine') 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 { -- cgit v1.2.3