Qss之QScrollBar(滚动条)美化
程序员文章站
2022-05-26 14:49:49
...
/**************************QScrollBar Vertical**************************/
QScrollBar:vertical {
background: transparent;
border: 0px;
border-image: url(":/imgs/imgs/scrollBar/scroll bar-bg.png");
margin: 0px 0px 0px 0px;
width: 12px;
}
QScrollBar::handle:vertical {
background: transparent;
border: 0px;
border-image: url(":/imgs/imgs/scrollBar/scroll bar-normal.png");
margin: 0px 1px 0px 1px;
width: 10px;
min-height: 10px;
height: 69px;
}
QScrollBar::handle:vertical:hover {
border-image: url(":/imgs/imgs/scrollBar/scroll bar-hover.png");
}
QScrollBar::handle:vertical:pressed {
border-image: url(":/imgs/imgs/scrollBar/scroll bar-click.png");
}
QScrollBar::handle:vertical:disabled {
border-image: url(":/imgs/imgs/scrollBar/scroll bar-disabled.png");
}
QScrollBar::sub-line:vertical {
background: transparent;
margin: 0px;
border-width: 0px;
height: 0px;
width: 0px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QScrollBar::add-line:vertical {
background: transparent;
margin: 0px;
border-width: 0px;
height: 0px;
width: 0px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar::up-arrow:vertical {
background: transparent;
width: 0px;
height: 0px;
margin: 0px;
border-image: url(":/img/img/scrollBar/arrow滚动条-up-01.png");
}
QScrollBar::up-arrow:vertical:hover {
border-image: url(":/img/img/scrollBar/arrow滚动条-up-02.png");
}
QScrollBar::up-arrow:vertical:pressed {
border-image: url(":/img/img/scrollBar/arrow滚动条-up-03.png");
}
QScrollBar::up-arrow:vertical:disabled {
border-image: url(":/img/img/scrollBar/arrow滚动条-up-04.png");
}
QScrollBar::down-arrow:vertical {
background: transparent;
width: 0px;
height: 0px;
margin: 0px;
border-image: url(":/img/img/scrollBar/arrow滚动条-down-01.png");
}
QScrollBar::down-arrow:vertical:hover {
border-image: url(":/img/img/scrollBar/arrow滚动条-down-02.png");
}
QScrollBar::down-arrow:vertical:pressed {
border-image: url(":/img/img/scrollBar/arrow滚动条-down-03.png");
}
QScrollBar::down-arrow:vertical:disabled {
border-image: url(":/img/img/scrollBar/arrow滚动条-down-04.png");
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
}
/**************************QScrollBar Horizontal**************************/
QScrollBar:horizontal {
background: transparent;
border: 0px;
border-image: url(":/imgs/imgs/scrollBar/scroll bar-bg_h.png");
margin: 0px 0px 0px 0px;
height: 12px;
}
QScrollBar::handle:horizontal {
background: transparent;
border: 0px;
border-image: url(":/imgs/imgs/scrollBar/scroll bar-normal_h.png");
margin: 1px 0px 1px 0px;
height: 10px;
min-width: 10px;
width: 69px;
}
QScrollBar::handle:horizontal:hover {
border-image: url(":/imgs/imgs/scrollBar/scroll bar-hover_h.png");
}
QScrollBar::handle:horizontal:pressed {
border-image: url(":/imgs/imgs/scrollBar/scroll bar-click_h.png");
}
QScrollBar::handle:horizontal:disabled {
border-image: url(":/imgs/imgs/scrollBar/scroll bar-disabled_h.png");
}
QScrollBar::sub-line:horizontal {
background: transparent;
margin: 0px;
border-width: 0px;
height: 0px;
width: 0px;
subcontrol-position: left;
subcontrol-origin: margin;
}
QScrollBar::add-line:horizontal {
background: transparent;
margin: 0px;
border-width: 0px;
height: 0px;
width: 0px;
subcontrol-position: right;
subcontrol-origin: margin;
}
QScrollBar::up-arrow:horizontal {
background: transparent;
width: 0px;
height: 0px;
margin: 0px;
border-image: url(":/img/img/scrollBar/arrow滚动条-up-01_h.png");
}
QScrollBar::up-arrow:horizontal:hover {
border-image: url(":/img/img/scrollBar/arrow滚动条-up-02_h.png");
}
QScrollBar::up-arrow:horizontal:pressed {
border-image: url(":/img/img/scrollBar/arrow滚动条-up-03_h.png");
}
QScrollBar::up-arrow:horizontal:disabled {
border-image: url(":/img/img/scrollBar/arrow滚动条-up-04_h.png");
}
QScrollBar::down-arrow:horizontal {
background: transparent;
width: 0px;
height: 0px;
margin: 0px;
border-image: url(":/img/img/scrollBar/arrow滚动条-down-01_h.png");
}
QScrollBar::down-arrow:horizontal:hover {
border-image: url(":/img/img/scrollBar/arrow滚动条-down-02_h.png");
}
QScrollBar::down-arrow:horizontal:pressed {
border-image: url(":/img/img/scrollBar/arrow滚动条-down-03_h.png");
}
QScrollBar::down-arrow:horizontal:disabled {
border-image: url(":/img/img/scrollBar/arrow滚动条-down-04_h.png");
}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
background: none;
}