aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/SwipeDelegate.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/SwipeDelegate.qml')
-rw-r--r--src/imports/controls/SwipeDelegate.qml25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/imports/controls/SwipeDelegate.qml b/src/imports/controls/SwipeDelegate.qml
index d9f72da9..01f21130 100644
--- a/src/imports/controls/SwipeDelegate.qml
+++ b/src/imports/controls/SwipeDelegate.qml
@@ -35,9 +35,9 @@
****************************************************************************/
import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.SwipeDelegate {
id: control
@@ -52,22 +52,27 @@ T.SwipeDelegate {
padding: 12
spacing: 12
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
+
swipe.transition: Transition { SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic } }
- contentItem: Text {
- leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
- rightPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+ alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
+ icon: control.icon
text: control.text
font: control.font
color: control.enabled ? Default.textDarkColor : Default.textDisabledColor
- elide: Text.ElideRight
- visible: control.text
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
}
background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
color: control.visualFocus
? (control.down ? Default.focusPressedColor : Default.delegateFocusColor)
: (control.down ? Default.delegatePressedColor : Default.backgroundColor)