PyQt/QScrollBar/Data/ScrollBar.qss

142 lines
4.2 KiB
Text
Raw Normal View History

2018-11-01 00:10:21 +08:00
/*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 {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowup_normal.png);
2018-11-01 00:10:21 +08:00
}
/*横向滚动条左边的三角形小图标*/
QScrollBar::left-arrow:horizontal {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowleft_normal.png);
2018-11-01 00:10:21 +08:00
}
/*纵向滚动条向上的三角形小图标 鼠标悬停*/
QScrollBar::up-arrow:vertical:hover {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowup_down.png);
2018-11-01 00:10:21 +08:00
}
/*横向滚动条左边的三角形小图标 鼠标悬停*/
QScrollBar::left-arrow:horizontal:hover {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowleft_down.png);
2018-11-01 00:10:21 +08:00
}
/*纵向滚动条向上的三角形小图标 鼠标按下*/
QScrollBar::up-arrow:vertical:pressed {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowup_highlight.png);
2018-11-01 00:10:21 +08:00
}
/*横向滚动条左边的三角形小图标 鼠标按下*/
QScrollBar::left-arrow:horizontal:pressed {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowleft_highlight.png);
2018-11-01 00:10:21 +08:00
}
/*纵向滚动条下面三角形部分*/
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 {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowdown_normal.png);
2018-11-01 00:10:21 +08:00
}
/*横向滚动条右侧三角形图标*/
QScrollBar::right-arrow:horizontal {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowright_normal.png);
2018-11-01 00:10:21 +08:00
}
/*纵向滚动条下面三角形图标 鼠标悬停*/
QScrollBar::down-arrow:vertical:hover {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowdown_down.png);
2018-11-01 00:10:21 +08:00
}
/*横向滚动条右侧三角形图标 鼠标悬停*/
QScrollBar::right-arrow:horizontal:hover {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowright_down.png);
2018-11-01 00:10:21 +08:00
}
/*纵向滚动条下面三角形图标 鼠标按下*/
QScrollBar::down-arrow:vertical:pressed {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowdown_highlight.png);
2018-11-01 00:10:21 +08:00
}
/*横向滚动条右侧三角形图标 鼠标按下*/
QScrollBar::right-arrow:horizontal:pressed {
2018-12-31 14:49:29 +08:00
image: url(Data/scrollbar/scrollbar_arrowright_highlight.png);
2018-01-20 01:09:17 +08:00
}