aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/imagine/CheckDelegate.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/imagine/CheckDelegate.qml')
-rw-r--r--src/imports/controls/imagine/CheckDelegate.qml32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/imports/controls/imagine/CheckDelegate.qml b/src/imports/controls/imagine/CheckDelegate.qml
index 76cd89c4..2336131f 100644
--- a/src/imports/controls/imagine/CheckDelegate.qml
+++ b/src/imports/controls/imagine/CheckDelegate.qml
@@ -34,22 +34,21 @@
**
****************************************************************************/
-import QtQuick 2.11
-import QtQuick.Templates 2.4 as T
-import QtQuick.Controls 2.4
-import QtQuick.Controls.impl 2.4
-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 2.5
+import QtQuick.Controls.impl 2.5
+import QtQuick.Controls.Imagine 2.5
+import QtQuick.Controls.Imagine.impl 2.5
T.CheckDelegate {
id: control
- implicitWidth: Math.max(background ? background.implicitWidth : 0,
- contentItem.implicitWidth + leftPadding + rightPadding)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(contentItem.implicitHeight,
- indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: contentItem.y + contentItem.baselineOffset
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
+ implicitContentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ implicitContentHeight + topPadding + bottomPadding,
+ implicitIndicatorHeight + topPadding + bottomPadding)
spacing: 12 // ###
@@ -58,6 +57,11 @@ T.CheckDelegate {
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.palette.text
@@ -97,10 +101,6 @@ T.CheckDelegate {
}
background: NinePatchImage {
- x: -leftInset; y: -topInset
- width: control.width + leftInset + rightInset
- height: control.height + topInset + bottomInset
-
source: Imagine.url + "checkdelegate-background"
NinePatchImageSelector on source {
states: [