-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu.qml
More file actions
202 lines (172 loc) · 5.82 KB
/
Menu.qml
File metadata and controls
202 lines (172 loc) · 5.82 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
import QtQuick 2.9
import QtQuick.Window 2.3
import "util.js" as Util
Window {
id: menu
title: "Neon Painel"
width: 134
height: 40 * 6
color: "transparent"
visible: false
flags: Qt.Tool | Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint | Qt.Popup
property string detailColor: Context.color()
onActiveChanged: {
if (!active) {
menu.visible = false
} else {
detailColor = Context.color()
blur.source = Context.blurEffect(menu, 0)
}
}
onVisibleChanged: {
if (visible) {
detailColor = Context.color()
blur.source = Context.blurEffect(menu, 0)
}
}
/*
Rectangle {
id: bgColor
color: "#fff"
opacity: 0.92
radius: 0
anchors.fill: parent
}
Image {
id: bgImage
anchors.fill: parent
source: "qrc:/Resources/noise.png"
opacity: 0.08
}*/
BlurEffect {
id: blur
}
Rectangle {
anchors.fill: parent
color: "#333"
opacity: 0.5
}
Image {
anchors.fill: parent
source: "/Resources/noise.png"
opacity: 0.1
}
Item {
id: item1
anchors.fill: parent
Rectangle {
id: rectangle1
color: "transparent"
visible: true
anchors.fill: parent
z: 1
ListView {
id: listView
interactive: false
anchors.rightMargin: 0
anchors.leftMargin: 0
anchors.bottomMargin: 0
anchors.topMargin: 5
anchors.fill: parent
model: ListModel {
ListElement {
name: "Criar Pasta"
itemName: "Create Folder"
}
ListElement {
name: "Criar Arquivo"
itemName: "Create File"
}
ListElement {
name: "Colar"
itemName: "Paste"
}
ListElement {
name: "Abrir Terminal"
itemName: "Open Terminal"
}
ListElement {
name: "Wallpapers"
itemName: "Background"
}
ListElement {
name: "Organizar"
itemName: "Organization"
}
}
delegate: Item {
x: 5
width: 80
height: 40
Row {
id: row1
spacing: 10
property string name: itemName
Rectangle {
x: 0
width: 120
height: 25
color: "transparent"
smooth: mouseArea.containsMouse
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
hoverEnabled: true
onHoveredChanged: {
item_select.color = detailColor
//text_select.color = "#ffffff"
}
onExited: {
item_select.color = "transparent"
//text_select.color = "#111111"
}
onPressed: {
if(mouse.button & Qt.LeftButton) {
if (name == "Abrir Terminal") {
Context.terminal()
}
if (name == "Organizar") {
Util.order()
}
if (name == "Wallpapers") {
Context.wallpapers()
}
item_select.color = "transparent"
//text_select.color = "#111111"
menu.visible = false
}
}
}
Rectangle {
id: item_select
x: -5
width: 134
height: 25
color: "transparent"
//opacity: 0.5
}
Text {
id: text_select
x: 10
text: name
width: 100
color: "#fff"//"#161616"
font.pixelSize: 12
font.family: "roboto light"
font.bold: true
antialiasing: true
anchors.verticalCenter: parent.verticalCenter
}
}
}
}
}
}
}
Rectangle {
anchors.fill: parent
color: "#00000000"
border { width: 1; color: "#fff" }
opacity: 0.2
}
}