diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-04 19:19:41 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-04 19:19:41 +0200 |
commit | d9295fc8f19e4005f8454e7f193f80316550ac0c (patch) | |
tree | f27c370d54bced09212b9c4a12b827d1cebb6110 /framework/qml/ListItem.qml | |
parent | d002eae7f8b443dd1bad914444c296088c2b6e85 (diff) | |
download | kube-d9295fc8f19e4005f8454e7f193f80316550ac0c.tar.gz kube-d9295fc8f19e4005f8454e7f193f80316550ac0c.zip |
One framework plugin to rule them all
Diffstat (limited to 'framework/qml/ListItem.qml')
-rw-r--r-- | framework/qml/ListItem.qml | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/framework/qml/ListItem.qml b/framework/qml/ListItem.qml new file mode 100644 index 00000000..165ac3ab --- /dev/null +++ b/framework/qml/ListItem.qml | |||
@@ -0,0 +1,64 @@ | |||
1 | /* | ||
2 | Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation; either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License along | ||
15 | with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | import QtQuick 2.4 | ||
20 | |||
21 | Item { | ||
22 | id: delegateRoot | ||
23 | |||
24 | readonly property bool isCurrentItem: ListView.isCurrentItem | ||
25 | |||
26 | height: Unit.width * 25 | ||
27 | width: parent.width | ||
28 | |||
29 | MouseArea { | ||
30 | id: mouseArea | ||
31 | |||
32 | anchors.fill: parent | ||
33 | } | ||
34 | |||
35 | Rectangle { | ||
36 | anchors.fill: parent | ||
37 | |||
38 | color: colorPalette.background | ||
39 | |||
40 | //clickColor | ||
41 | Rectangle { | ||
42 | id: clickColor | ||
43 | |||
44 | anchors.fill: parent | ||
45 | |||
46 | color: colorPalette.selected | ||
47 | opacity: 0.4 | ||
48 | |||
49 | visible: mouseArea.pressed | ||
50 | } | ||
51 | |||
52 | //border | ||
53 | Rectangle { | ||
54 | |||
55 | anchors.bottom: parent.bottom | ||
56 | |||
57 | height: 1 | ||
58 | width: parent.width | ||
59 | |||
60 | color: colorPalette.border | ||
61 | opacity: 0.2 | ||
62 | } | ||
63 | } | ||
64 | } | ||