123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441 |
- /* ================================================ *
- author:lei
- lastedited:2020.2
- * ================================================ */
- /*hover*/
- /*actived*/
- /*gradient start*/
- /*gradient end*/
- QWidget
- {
- color: #ffffff;
- background-color: #1d1d1d;
- }
- QFrame{
- color: #ffffff;
- background-color: #1d1d1d;/*不能设置为transparent*/
- }
- QMainWindow::separator{
- border: 1px solid #999999;
- border-style: outset;
- width: 4px;
- height: 4px;
- }
- QMainWindow::separator:hover{
- background: #efca22;
- }
- QSplitter::handle{
- border: 1px solid #999999;
- border-style: outset;
- width: 4px;
- height: 4px;
- }
- QSplitter::handle:hover{/*splitter->handle(1)->setAttribute(Qt::WA_Hover, true);才生效*/
- border-color: #efca22;
- }
- QSplitter::handle:pressed{
- border-color: #efca22;
- }
- QSizeGrip{
- background-color: none;
- }
- /* =============================================== */
- /* Label */
- /* =============================================== */
- QLabel {
- background: transparent;
- border: 1px solid transparent;
- padding: 1px;
- }
- /* A QLabel is a QFrame ... */
- /* A QToolTip is a QLabel ... */
- QToolTip {
- border: 1px solid #999999;
- padding: 5px;
- border-radius: 3px;
- opacity:210;
- }
- /* =============================================== */
- /* TextBox */
- /* =============================================== */
- QLineEdit {
- background: #1d1d1d;/*不建议设为透明,否则table编辑时会字显示*/
- selection-background-color: #efca22;
- border: 1px solid #999999;
- border-radius: 2px;
- border-style: inset;
- padding: 0 1px;
- }
- QLineEdit:hover{
- border-color: #efca22;
- }
- QLineEdit:focus{
- border-color: #efca22;
- }
- /*QLineEdit[readOnly="true"] { color: gray }*/
- QLineEdit[echoMode="2"]{
- lineedit-password-character: 9679;/*字符的ascii码35 88等 */
- }
- QLineEdit:read-only {
- color: lightgray;
- }
- QLineEdit:disabled{
- color: lightgray;
- background: lightgray;
- }
- QTextEdit{
- selection-background-color:#efca22;
- border: 1px solid #999999;
- border-style: inset;
- }
- QTextEdit:hover{
- border-color: #efca22;
- }
- QTextEdit:focus{
- border-color: #efca22;
- }
- /* =============================================== */
- /* Button */
- /* =============================================== */
- QPushButton {
- border: 1px solid #999999;
- border-radius: 2px;
- background-color: #f6d541;
- padding: 1px 4px;
- min-width: 50px;
- min-height: 16px;
- }
- QPushButton:hover{
- background-color: #efca22;
- border-color: #efca22;
- }
- QPushButton:pressed
- {
- border-width: 1px;
- background-color: #efca22;
- border-color: #999999;
- }
- QPushButton:focus, QPushButton:default {
- border-color: #efca22; /* make the default button prominent */
- }
- QToolButton,QToolButton:unchecked { /* ToolBar里的按钮和带下拉菜单的按钮 */
- border: 1px solid transparent;
- border-radius: 3px;
- background-color: transparent;
- margin: 1px;
- }
- QToolButton:checked{
- background-color: #efca22;
- border-color: #efca22;
- }
- QToolButton:hover{
- background-color: #efca22;
- border-color: #efca22;
- }
- QToolButton:pressed,QToolButton:checked:hover{
- background-color: #efca22;
- border-color: #efca22;
- }
- QToolButton:checked:pressed{
- background-color: #efca22;
- }
- /* only for MenuButtonPopup */
- QToolButton[popupMode="1"]{
- padding-left: 1px;
- padding-right: 15px; /* make way for the popup button */
- border: 1px solid #999999;
- min-height: 15px;
- /*background: qlineargradient(x1:0, y1:0 ,x2:0, y2:1
- stop: 0 #EEEEEF, stop: 0.05 #DADADF, stop: 0.5 #DADADF
- stop: 0.95 #EEEEEF stop: 1#EEEEEF)*/
- }
- QToolButton[popupMode="1"]:hover{
- background-color: #efca22;
- border-color: #efca22;
- }
- QToolButton[popupMode="1"]:pressed{
- border-width: 1px;
- background-color: #efca22;
- border-color: #999999;
- }
- QToolButton::menu-button {
- border: 1px solid #999999;
- border-top-right-radius: 2px;
- border-bottom-right-radius: 2px;
- width: 16px;
- }
- /* =============================================== */
- /* Slider ProgressBar */
- /* =============================================== */
- QProgressBar {
- border: 1px solid #999999;
- border-radius: 4px;
- text-align: center;
- }
- QProgressBar::chunk {
- background-color: #efca22;
- width: 4px;
- margin: 1px;
- }
- QSlider{
- border: 1px solid transparent;
- }
- QSlider::groove{
- border: 1px solid #999999;
- background: #1d1d1d;
- }
- QSlider::handle {/*设置中间的那个滑动的键*/
- border: 1px solid #999999;
- background: #efca22;
- }
- QSlider::groove:horizontal {
- height: 3px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
- left:5px; right: 5px;
- }
- QSlider::groove:vertical{
- width: 3px;
- top: 5px; bottom: 5px;
- }
- QSlider::handle:horizontal{
- width: 6px;
- margin: -7px; /* height */
- }
- QSlider::handle:vertical{
- height: 6px;
- margin: -7px; /* height */
- }
- QSlider::add-page{/*还没有滑上去的地方*/
- border: 1px solid #999999;
- background:#EEEEEF;
- }
- QSlider::sub-page{/*已经划过的从地方*/
- background: #efca22;
- }
- /* =============================================== */
- /* ScrollBar */
- /* =============================================== */
- QScrollBar{
- background-color: #1d1d1d;
- border: 1px solid #999999;
- border-radius: 5px;
- padding: 1px;
- height: 10px;
- width: 10px;
- }
- QScrollBar:hover{
- border-color:#efca22;
- }
- QScrollBar::handle{
- border-radius: 3px;
- background: #efca22;
- min-width: 16px;
- min-height: 16px;
- }
- QScrollBar::handle:hover {
- background: #efca22;
- }
- QScrollBar::add-line, QScrollBar::sub-line,
- QScrollBar::add-page, QScrollBar::sub-page {
- width: 0px;
- background: transparent;
- }
- QScrollArea{
- border: none;
- }
- /*QScrollArea QAbstractSlider{
- border-radius: 0px;
- }*/
- /* =============================================== */
- /* DockWidget */
- /* =============================================== */
- QDockWidget, QDockWidget > QWidget/*not work*/
- {
- border-color: #999999;/*qt bug*/
- background: transparent;
- }
- QDockWidget::title {
- border-bottom: 1px solid #999999;
- border-style: inset;
- text-align: left; /* align the text to the left */
- padding: 6px;
- }
- /* =============================================== */
- /* GroupBox */
- /* =============================================== */
- QGroupBox {
- background-color: #1d1d1d;
- border: 1px solid #999999;
- border-radius: 4px;
- margin-top: 0.5em;
- }
- QGroupBox::title {
- subcontrol-origin: margin;
- subcontrol-position: top left;
- left: 1em;
- top: 0.1em;
- background-color: #1d1d1d;
- }
- /* =============================================== */
- /* ToolBox */
- /* =============================================== */
- QToolBox{
- border: 1px solid #999999;
- }
- QToolBox::tab {
- background: #EEEEEF;
- border: 1px solid #999999;
- border-radius: 1px;
- }
- QToolBox::tab:hover {
- background-color: #efca22;
- border-color: transparent;
- }
- QToolBox::tab:pressed {
- background-color: #efca22;
- border-color: transparent;
- }
- QToolBox::tab:selected {
- font-weight: bold;
- border-color: #efca22;
- }
- /* =============================================== */
- /* TabWidget */
- /* =============================================== */
- QTabWidget{
- margin-top:10px;
- }
- QTabWidget::pane{
- border: 1px solid #999999;
- }
- QTabWidget::tab-bar {
- left: 0px;
- }
- QTabBar::tab {
- background: #1d1d1d;
- border: 1px solid #999999;
- padding: 3px 5px;
- }
- QTabBar::tab:hover {
- background: #efca22;
- border-color: transparent;
- }
- QTabBar::tab:selected {
- background: #efca22;
- border-color: #efca22;
- }
- QTabBar::tab:pressed {
- background: #efca22;
- border-color: transparent;
- }
- QTabBar::tab:focus {
- border-color: #efca22;
- }
- QTabBar::tab:top{
- margin-top: 3px;
- border-bottom: transparent;
- margin-right: 1px;
- }
- QTabBar::tab:bottom{
- margin-bottom: 3px;
- border-top: transparent;
- margin-right: 1px;
- }
- QTabBar::tab:left{
- border-right: transparent;
- margin-bottom: 1px;
- }
- QTabBar::tab:right{
- border-left: transparent;
- margin-bottom: 1px;
- }
- /* =============================================== */
- /* QHeaderView for list table */
- /* =============================================== */
- QHeaderView {
- border: none;
- margin: 0px;
- padding: 0px;
- }
- QHeaderView::section, QTableCornerButton::section {/*设置表头属性*//*左上角*/
- background-color: #EEEEEF;
- padding: 0 3px;
- border-right: 1px solid #999999;
- border-bottom: 1px solid #999999;
- border-radius: 0px;
- }
- QHeaderView::section:hover, QTableCornerButton::section:hover{
- background-color: #efca22;
- }
- QHeaderView::section:pressed{
- background-color: #efca22;
- }
- QHeaderView::section:checked {
- background-color: #efca22;
- }
- /* =============================================== */
- /* QTableWidget */
- /* =============================================== */
- QTableWidget, QTableView
- {
- gridline-color: #999999; /*表格中的网格线条颜色*/
- background: #1d1d1d;
- /*设置交替颜色,需要在函数属性中设置:tableWidget->setAlternatingRowColors(true)*/
- alternate-background-color: #EEEEEF;
- /*selection-color:#1d1d1d; 鼠标选中时前景色:文字颜色*/
- selection-background-color:#efca22; /*鼠标选中时背景色*/
- border:1px solid #999999; /*边框线的宽度、颜色*/
- /*border:none; 去除边界线*/
- /*border-radius:5px;*/
- /*padding:10px 10px;*/ /*表格与边框的间距*/
- }
- QTableView::item, QTabWidget::item{
- background: transparent;
- outline-style: none;
- border: none;
- }
- QTableView::item:hover {
- background: #efca22;
- border: 1px solid #efca22;
- }
- QTableView::item:selected {
- background: #efca22;
- color: #EEEEEF;
- }
- QTableView::item:selected:active {
- background: #efca22;
- color: #EEEEEF;
- }
- QTableWidget QComboBox{
- margin: 2px;
- border: none;
- }
|