[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kirigami] src/styles/Material: use the internal material ripple implementation
From: Marco Martin <null () kde ! org>
Date: 2018-09-20 9:04:10
Message-ID: E1g2usc-0007IZ-8i () code ! kde ! org
[Download RAW message or body]
Git commit ba85c2c83946cd219591c0af77219bbb67fae223 by Marco Martin.
Committed on 20/09/2018 at 09:04.
Pushed by mart into branch 'master'.
use the internal material ripple implementation
M +10 -25 src/styles/Material/SwipeListItem.qml
https://commits.kde.org/kirigami/ba85c2c83946cd219591c0af77219bbb67fae223
diff --git a/src/styles/Material/SwipeListItem.qml b/src/styles/Material/Sw=
ipeListItem.qml
index 5ea1765..1f8e76e 100644
--- a/src/styles/Material/SwipeListItem.qml
+++ b/src/styles/Material/SwipeListItem.qml
@@ -19,6 +19,8 @@
=
import QtQuick 2.5
import org.kde.kirigami 2.4
+import QtQuick.Controls.Material 2.1 as Mat
+import QtQuick.Controls.Material.impl 2.1 as MatImp
import "../../private"
import "../../templates" as T
=
@@ -60,31 +62,14 @@ T.SwipeListItem {
}
}
background: DefaultListItemBackground {
- //TODO: this will have to reuse QQC2.1 Ripple
- Rectangle {
- id: ripple
- anchors.centerIn: parent
- width: parent.width
- height: parent.width
- radius: width
- color: Qt.rgba(1,1,1,0.3)
- scale: 0
- opacity: 1
- ParallelAnimation {
- id: clickAnim
- ScaleAnimator {
- target: ripple
- from: 0
- to: 1
- duration: Units.longDuration
- }
- OpacityAnimator {
- target: ripple
- from: 0
- to: 1
- duration: Units.longDuration
- }
- }
+
+ MatImp.Ripple {
+ anchors.fill: parent
+ clip: visible
+ pressed: listItem.pressed
+ anchor: listItem
+ active: listItem.down || listItem.visualFocus =
+ color: Qt.rgba(0,0,0,0.2)
}
}
implicitHeight: contentItem.implicitHeight + Units.smallSpacing * 6
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic