diff options
author | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2016-02-29 15:56:03 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-04-13 09:07:38 +0000 |
commit | 7a8f055c6ee274292f2585f59ff6bac4383d6b01 (patch) | |
tree | 4c7b3537d40c8dd50284e21622d36d28db67d501 /src/imports/controls/SwipeDelegate.qml | |
parent | 4ae3a828ad972e24802ea711fc12e12883cc28be (diff) |
Expose checkable where necessary, instead of in QQuickAbstractButton
QQuickCheckBox, QQuickRadioButton and QQuickSwitch are inherently
checkable, so having this property available to QML doesn't make
sense.
QQuickButton and QQuickMenuItem are the two classes that need
to expose the property.
Change-Id: Ic421c195295c4bef0fc934c98fa9e781d98c9b67
Task-number: QTBUG-51554
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/SwipeDelegate.qml')
-rw-r--r-- | src/imports/controls/SwipeDelegate.qml | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/imports/controls/SwipeDelegate.qml b/src/imports/controls/SwipeDelegate.qml index b3cf4714..45d6ed54 100644 --- a/src/imports/controls/SwipeDelegate.qml +++ b/src/imports/controls/SwipeDelegate.qml @@ -52,8 +52,8 @@ T.SwipeDelegate { //! [contentItem] contentItem: Text { - leftPadding: control.checkable && control.mirrored ? control.indicator.width + control.spacing : 0 - rightPadding: control.checkable && !control.mirrored ? control.indicator.width + control.spacing : 0 + leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0 + rightPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0 text: control.text font: control.font @@ -73,16 +73,6 @@ T.SwipeDelegate { } //! [contentItem] - //! [indicator] - indicator: Image { - x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding - y: control.topPadding + (control.availableHeight - height) / 2 - - visible: control.checked - source: control.checkable ? "qrc:/qt-project.org/imports/Qt/labs/controls/images/check.png" : "" - } - //! [indicator] - //! [background] background: Rectangle { color: control.pressed ? "#bdbebf" : "#eeeeee" |