forked from PyQt5/PyQt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ScrollBar.qss
142 lines (136 loc) · 4.24 KB
/
ScrollBar.qss
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
/*QScrollBar Style*/
/*纵向滚动条*/
QScrollBar:vertical {
background: transparent; /*背景透明*/
width: 10px; /*宽度*/
margin: 0px 0px 0px 0px; /**/
padding-top: 12px; /*距离上面12px*/
padding-bottom: 12px; /*距离底部12px*/
}
/*横向滚动条*/
QScrollBar:horizontal {
background: transparent;
height: 10px; /*高度*/
margin: 0px 0px 0px 0px;
padding-left: 12px; /*距离左边12px*/
padding-right: 12px; /*距离右边12px*/
}
/*当鼠标放到纵向或者横向滚动条上面时*/
QScrollBar:vertical:hover,QScrollBar:horizontal:hover {
background: rgba(0, 0, 0, 30); /*修改背景透明度 30*/
border-radius: 5px; /*圆角*/
}
/*纵向滚动条上面的滑块*/
QScrollBar::handle:vertical {
background: rgba(0, 0, 0, 50);
width: 10px;
border-radius: 5px;
border: none;
}
/*横向滚动条上面的滑块*/
QScrollBar::handle:horizontal {
background: rgba(0, 0, 0, 50);
height: 10px;
border-radius: 5px;
border: none;
}
/*当鼠标放到滚动条滑块上面时改变透明度实现颜色的深浅变化*/
QScrollBar::handle:vertical:hover,QScrollBar::handle:horizontal:hover {
background: rgba(0, 0, 0, 100);
}
/*纵向滚动条下部分块*/
QScrollBar::add-page:vertical {
width: 10px;
background: transparent;
}
/*横向滚动条后面部分块*/
QScrollBar::add-page:horizontal {
height: 10px;
background: transparent;
}
/*纵向滚动条上面部分块*/
QScrollBar::sub-page:vertical {
width: 10px;
background: transparent;
}
/*横向滚动条左部分块*/
QScrollBar::sub-page:horizontal {
height: 10px;
background: transparent;
}
/*纵向滚动条顶部三角形位置*/
QScrollBar::sub-line:vertical {
height: 12px;
width: 10px;
background: transparent;
subcontrol-position: top;
}
/*横向滚动条左侧三角形位置*/
QScrollBar::sub-line:horizontal {
height: 10px;
width: 12px;
background: transparent;
subcontrol-position: left;
}
/*纵向滚动条向上的三角形小图标*/
QScrollBar::up-arrow:vertical {
image: url(scrollbar/scrollbar_arrowup_normal.png);
}
/*横向滚动条左边的三角形小图标*/
QScrollBar::left-arrow:horizontal {
image: url(scrollbar/scrollbar_arrowleft_normal.png);
}
/*纵向滚动条向上的三角形小图标 鼠标悬停*/
QScrollBar::up-arrow:vertical:hover {
image: url(scrollbar/scrollbar_arrowup_down.png);
}
/*横向滚动条左边的三角形小图标 鼠标悬停*/
QScrollBar::left-arrow:horizontal:hover {
image: url(scrollbar/scrollbar_arrowleft_down.png);
}
/*纵向滚动条向上的三角形小图标 鼠标按下*/
QScrollBar::up-arrow:vertical:pressed {
image: url(scrollbar/scrollbar_arrowup_highlight.png);
}
/*横向滚动条左边的三角形小图标 鼠标按下*/
QScrollBar::left-arrow:horizontal:pressed {
image: url(scrollbar/scrollbar_arrowleft_highlight.png);
}
/*纵向滚动条下面三角形部分*/
QScrollBar::add-line:vertical {
height: 12px;
width: 10px;
background: transparent;
subcontrol-position: bottom;
}
/*横向滚动条右边的三角形部分*/
QScrollBar::add-line:horizontal {
height: 10px;
width: 12px;
background: transparent;
subcontrol-position: right;
}
/*纵向滚动条下面三角形图标*/
QScrollBar::down-arrow:vertical {
image: url(scrollbar/scrollbar_arrowdown_normal.png);
}
/*横向滚动条右侧三角形图标*/
QScrollBar::right-arrow:horizontal {
image: url(scrollbar/scrollbar_arrowright_normal.png);
}
/*纵向滚动条下面三角形图标 鼠标悬停*/
QScrollBar::down-arrow:vertical:hover {
image: url(scrollbar/scrollbar_arrowdown_down.png);
}
/*横向滚动条右侧三角形图标 鼠标悬停*/
QScrollBar::right-arrow:horizontal:hover {
image: url(scrollbar/scrollbar_arrowright_down.png);
}
/*纵向滚动条下面三角形图标 鼠标按下*/
QScrollBar::down-arrow:vertical:pressed {
image: url(scrollbar/scrollbar_arrowdown_highlight.png);
}
/*横向滚动条右侧三角形图标 鼠标按下*/
QScrollBar::right-arrow:horizontal:pressed {
image: url(scrollbar/scrollbar_arrowright_highlight.png);
}