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.qml34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/imports/controls/SwipeDelegate.qml b/src/imports/controls/SwipeDelegate.qml
index d9f72da9..70c76f26 100644
--- a/src/imports/controls/SwipeDelegate.qml
+++ b/src/imports/controls/SwipeDelegate.qml
@@ -34,10 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.SwipeDelegate {
id: control
@@ -52,24 +52,28 @@ T.SwipeDelegate {
padding: 12
spacing: 12
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.palette.text
+
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
+ color: control.palette.text
}
background: Rectangle {
- color: control.visualFocus
- ? (control.down ? Default.focusPressedColor : Default.delegateFocusColor)
- : (control.down ? Default.delegatePressedColor : Default.backgroundColor)
+ implicitWidth: 100
+ implicitHeight: 40
+ color: Color.blend(control.down ? control.palette.midlight : control.palette.light,
+ control.palette.highlight, control.visualFocus ? 0.15 : 0.0)
}
}