-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTagsView.qml
71 lines (57 loc) · 1.61 KB
/
TagsView.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import QtQuick 2.0
import QtQuick.Layouts 1.0
Item {
property var tags
id: root
implicitHeight: layout.implicitHeight
implicitWidth: layout.implicitWidth
RowLayout {
id: layout
anchors.fill: parent
ListView {
height: 15
clip: true
boundsBehavior: Flickable.StopAtBounds
orientation: ListView.Horizontal
spacing: 3
model: tags
delegate: Tag {
text: name
}
Image {
source: "qrc:/images/typicons/tags_to_left.png"
visible: !parent.atXBeginning
opacity: 0.5
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
}
Image {
source: "qrc:/images/typicons/tags_to_right.png"
visible: !parent.atXEnd
opacity: 0.5
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
}
Layout.fillWidth: true
}
Rectangle {
height: 15
width: 15
radius: 3
color: ma.containsMouse ? "#580000" : "#b05050"
Image {
id: plus
anchors.centerIn: parent
source: "qrc:/images/typicons/add_tag.png"
}
MouseArea {
id: ma
anchors.fill: parent
hoverEnabled: true
onClicked: {
// TODO
}
}
}
}
}