Changeset View
Changeset View
Standalone View
Standalone View
org.kde.desktop/private/DefaultListItemBackground.qml
Show All 15 Lines | |||||
16 | * Software Foundation and appearing in the file LICENSE.GPL included in | 16 | * Software Foundation and appearing in the file LICENSE.GPL included in | ||
17 | * the packaging of this file. Please review the following information to | 17 | * the packaging of this file. Please review the following information to | ||
18 | * ensure the GNU General Public License version 2.0 requirements will be | 18 | * ensure the GNU General Public License version 2.0 requirements will be | ||
19 | * met: http://www.gnu.org/licenses/gpl-2.0.html. | 19 | * met: http://www.gnu.org/licenses/gpl-2.0.html. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | 22 | | |||
23 | import QtQuick 2.1 | 23 | import QtQuick 2.1 | ||
24 | import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate | 24 | import org.kde.kirigami 2.2 as Kirigami | ||
25 | 25 | | |||
26 | Rectangle { | 26 | Rectangle { | ||
27 | id: background | 27 | id: background | ||
28 | color: highlighted || (controlRoot.pressed && !controlRoot.checked && !controlRoot.sectionDelegate) ? StylePrivate.SystemPaletteSingleton.highlight(controlRoot.enabled) : StylePrivate.SystemPaletteSingleton.base(controlRoot.enabled) | 28 | color: highlighted || (controlRoot.pressed && !controlRoot.checked && !controlRoot.sectionDelegate) ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor | ||
29 | 29 | | |||
30 | visible: controlRoot.ListView.view ? controlRoot.ListView.view.highlight === null : true | 30 | visible: controlRoot.ListView.view ? controlRoot.ListView.view.highlight === null : true | ||
31 | Rectangle { | 31 | Rectangle { | ||
32 | anchors.fill: parent | 32 | anchors.fill: parent | ||
33 | color: StylePrivate.SystemPaletteSingleton.highlight(controlRoot.enabled) | 33 | color: Kirigami.Theme.highlightColor | ||
34 | opacity: controlRoot.hovered && !controlRoot.pressed ? 0.2 : 0 | 34 | opacity: controlRoot.hovered && !controlRoot.pressed ? 0.2 : 0 | ||
35 | Behavior on opacity { NumberAnimation { duration: 150 } } | 35 | Behavior on opacity { NumberAnimation { duration: 150 } } | ||
36 | } | 36 | } | ||
37 | Behavior on color { | 37 | Behavior on color { | ||
38 | ColorAnimation { duration: 150 } | 38 | ColorAnimation { duration: 150 } | ||
39 | } | 39 | } | ||
40 | } | 40 | } | ||
41 | 41 | |