-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyqss.h
206 lines (164 loc) · 4.6 KB
/
myqss.h
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
203
204
205
206
#ifndef MYQSS_H
#define MYQSS_H
#include<QString>
/*此文件统一存放一些QSS样式代码*/
//播放按钮样式
inline QString PlayStyle()
{
return "QPushButton"
" {"
"background-image:url(:/res/image/image/play.png);"
" background-repeat:no-repeat;"
" background-position:center center;"
" border:none;"
" }"
"QPushButton:hover{"
" background-repeat:no-repeat;"
" background-position:center center;"
"background-image:url(:/res/image/image-hover/play-hover.png);"
" }"
" QPushButton:pressed{"
"background-repeat:no-repeat;"
" background-position:center center;"
" background-image:url(:/res/image/image/play.png);"
"}";
}
//暂停按钮样式
inline QString PaseStyle()
{
return "QPushButton"
" {"
"background-image:url(:/res/image/image/pase.png);"
" background-repeat:no-repeat;"
" background-position:center center;"
" border:none;"
" }"
"QPushButton:hover{"
" background-repeat:no-repeat;"
" background-position:center center;"
"background-image:url(:/res/image/image-hover/pase-hover.png);"
" }"
" QPushButton:pressed{"
"background-repeat:no-repeat;"
" background-position:center center;"
" background-image:url(:/res/image/image/pase.png);"
"}";
}
inline QString RandomStyle()
{
return "QPushButton"
" {"
"background-image:url(:/res/image/image/play-random.png);"
" background-repeat:no-repeat;"
" background-position:center center;"
" border:none;"
" }"
"QPushButton:hover{"
" background-repeat:no-repeat;"
" background-position:center center;"
"background-image:url(:/res/image/image-hover/play-random-hover.png);"
" }"
" QPushButton:pressed{"
"background-repeat:no-repeat;"
" background-position:center center;"
" background-image:url(:/res/image/image/play-random.png);"
"}";
}
inline QString LoopStyle()
{
return "QPushButton"
" {"
"background-image:url(:/res/image/image/loop.png);"
" background-repeat:no-repeat;"
" background-position:center center;"
" border:none;"
" }"
"QPushButton:hover{"
" background-repeat:no-repeat;"
" background-position:center center;"
"background-image:url(:/res/image/image-hover/loop-hover.png);"
" }"
" QPushButton:pressed{"
"background-repeat:no-repeat;"
" background-position:center center;"
" background-image:url(:/res/image/image/loop.png);"
"}";
}
inline QString LoopOneStyle()
{
return "QPushButton"
" {"
"background-image:url(:/res/image/image/loop-one.png);"
" background-repeat:no-repeat;"
" background-position:center center;"
" border:none;"
" }"
"QPushButton:hover{"
" background-repeat:no-repeat;"
" background-position:center center;"
"background-image:url(:/res/image/image-hover/loop-one-hover.png);"
" }"
" QPushButton:pressed{"
"background-repeat:no-repeat;"
" background-position:center center;"
" background-image:url(:/res/image/image/loop-one.png);"
"}";
}
inline QString ListWidgetStyle(){
return "QScrollBar:vertical"
"{"
"width:8px;"
"background-color:transparent;"
"margin:0px,0px,0px,0px;"
" padding-top:12px; /*上预留位置*/"
" padding-bottom:12px; /*下预留位置*/"
"}"
" QScrollBar::handle:vertical"
" {"
"width:8px;"
" background-color:rgba(255,255,255,0.2);"
" border-radius:4px;"
" min-height:20px;"
" }"
" QScrollBar::handle:vertical:hover"
" {"
" width:9px;"
" background-color:rgba(255,255,255,0.5);"
" border-radius:4px;"
" min-height:20;"
" }"
" QScrollBar::add-line:vertical"
" {"
" height:12px;"
" width:10px;"
" border-image:url(:/selectfile/scroll/3.png);"
" subcontrol-position:bottom;"
" }"
" QScrollBar::sub-line:vertical"
" {"
" height:12px;"
"width:10px;"
" border-image:url(:/selectfile/scroll/1.png);"
"subcontrol-position:top;"
" }"
" QScrollBar::add-line:vertical:hover"
" {"
" height:12px;"
"width:10px;"
" border-image:url(:/selectfile/scroll/4.png);"
"subcontrol-position:bottom;"
" }"
" QScrollBar::sub-line:vertical:hover"
" {"
" height:12px;"
" width:10px;"
" border-image:url(:/selectfile/scroll/2.png);"
" subcontrol-position:top;"
" }"
" QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical"
" {"
" background-color:transparent;"
" border-radius:4px;"
"}";
}
#endif // MYQSS_H