From 99928905f2104ff7b7d659f7fd42ffe7d929aeb4 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 2 May 2018 11:23:13 +0200 Subject: Imagine: use background insets All others have been updated, except GroupBox that has some strange special handling for positioning the background. Change-Id: Ief5a68cbeedbdc3c66b85e8d03198f70e35aac61 Reviewed-by: Qt CI Bot Reviewed-by: Mitch Curtis --- src/imports/controls/imagine/Button.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/imports/controls/imagine/Button.qml') diff --git a/src/imports/controls/imagine/Button.qml b/src/imports/controls/imagine/Button.qml index c9f134c1..c8962a6b 100644 --- a/src/imports/controls/imagine/Button.qml +++ b/src/imports/controls/imagine/Button.qml @@ -56,6 +56,11 @@ T.Button { 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 + icon.width: 24 icon.height: 24 icon.color: control.enabled && control.flat && control.highlighted ? control.palette.highlight @@ -76,10 +81,6 @@ T.Button { } background: NinePatchImage { - x: -leftInset; y: -topInset - width: control.width + leftInset + rightInset - height: control.height + topInset + bottomInset - source: Imagine.url + "button-background" NinePatchImageSelector on source { states: [ -- cgit v1.2.3