-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplications.qml
More file actions
184 lines (156 loc) · 4.47 KB
/
Applications.qml
File metadata and controls
184 lines (156 loc) · 4.47 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
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
Rectangle {
id: applicationInfo
width: main.defaultWidth
height: 40
color: "transparent"
property string nome: ""
property string pidname: ""
property string obclass: ""
property bool minimize: true
property bool tooTip: true
property int winId: 0
property int pid: 0
property alias destak: destak
property alias effect: effect
property alias bgOpc: bgOpc
property bool destacad: false
ToolTip {
id: toolTip
x: 44
text: nome
delay: 500
timeout: 3000
visible: false
property bool timeActive: false
property alias timer: timer
contentItem: Label {
text: toolTip.text
wrapMode: Text.WordWrap
font: toolTip.font
color: "#ffffff"
}
background: Rectangle {
opacity: 0.9
color: main.detailInfoColor
}
Timer {
id: timer
running: false
interval: 1000
repeat: false
onTriggered: {
if (toolTip.timeActive) {
toolTip.visible = true
}
}
}
}
Rectangle {
id: destak
x: 1
y: parent.height - 3
height: 3
width: parent.width - 2
color: main.detailColor//"#007fff"
visible: true
opacity: 0.5//0.5
}
RectangularGlow {
id: effect
anchors.fill: destak
glowRadius: 0
spread: 0
color: main.detailColor
cornerRadius: destak.radius + glowRadius
}
Rectangle {
id: bgOpc
anchors.fill: parent
color: main.detailColor//"#ffffff"
opacity: 0.0
}
Image {
id: appIcon
x: 12
y: 8
width: 24
height: 24
source: "image://pixmap/" + winId + ';' + obclass + ',' + pidname
fillMode: Image.PreserveAspectFit//Image.Stretch
antialiasing: true
smooth: true
cache: false
//rotation: -5
//transform: Rotation {angle: -20}
}
Timer {
id: minimizeDelay
running: false
interval: 100
repeat: false
onTriggered: {
if (!Context.isMinimized(pidname) & Context.isActive(pidname)) {
Context.manyMinimizes(pidname)
minimize = false;
} else {
Context.manyActives(pidname)
minimize = true;
}
activeWindow()
}
}
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
onPressed: {
//acessoRapido.visible = false
//acessoRapido.accessBlur.source = ""
main.arrowAside.text = '\uf106'
main.accessOpened = true
//neonMenu.visible = false
neonMenu.textSearch.focus = false
main.menuOpened = true
neonMenu.desactive()
if (mouse.button & Qt.LeftButton) {
showAppInfo.visible = false
neonMenu.textSearch.focus = false
//neonMenu.addApps()
//main.clickOpc = main.startOpc
minimizeDelay.stop()
minimizeDelay.start()
} else {
main.showAppInfo.winIds = Context.windowsBywmclass(pidname)
main.showAppInfo.y = main.y - 40
main.showAppInfo.x = ((Context.mouseX() - mouseX) + (applicationInfo.width / 2)) - (main.showAppInfo.width / 2)
main.showAppInfo.setText()
main.showAppInfo.visible = true
main.showAppInfo.requestActivate()
//clickOpc = startOpc
main.neonMenu.textSearch.focus = false
}
}
hoverEnabled: true
onHoveredChanged: {
//bgOpc.opacity = 0.2//0.75
effect.glowRadius = 4
effect.opacity = 0.8
destak.opacity = 0.5
toolTip.timeActive = true
toolTip.timer.stop()
toolTip.timer.start()
}
onExited: {
if (destacad == false) {
//bgOpc.opacity = 0
effect.glowRadius = 0
effect.opacity = 0
destak.opacity = 0.5
}
toolTip.visible = false
toolTip.timeActive = false
}
}
}