QToolButton設定QSS
2407 ワード
QToolButton設定QSS
QMenu::icon:checked { background: #a3d1ff; border: 1px solid #3399ff; position: absolute; top: 1px; right: 1px; bottom: 1px; left: 1px; }
.QPushButton,.QToolButton{
border-style:none;
border:1px solid #B2B6B9;
color:#000000;
padding:5px;
min-height:15px;
border-radius:5px;
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #E1E4E6,stop:1 #CCD3D9);
}
.QPushButton:hover,.QToolButton:hover{
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #F2F3F4,stop:1 #E7E9EB);
}
.QPushButton:pressed,.QToolButton:pressed{
background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #E1E4E6,stop:1 #CCD3D9);
}
.QToolButton::menu-indicator{
image:None;
}
QToolButton#btnMenu,QToolButton#btnTool,QPushButton#btnMenu_Min,QPushButton#btnMenu_Max,QPushButton#btnMenu_Close{
border-radius:3px;
color:#000000;
padding:3px;
margin:0px;
background:none;
border-style:none;
}
QToolButton#btnMenu:hover,QPushButton#btnMenu_Min:hover,QPushButton#btnMenu_Max:hover{
color:#FFFFFF;
margin:1px 1px 2px 1px;
background-color:rgba(51,127,209,230);
}
/*QToolButton#btnTool:hover{
color:#FFFFFF;
margin:1px 1px 2px 1px;
background-color:rgba(51,127,209,230);
}*/
QToolButton#btnTool:hover{ /* */
color:rgb(255, 255, 255);
min-height:20;
border-style: solid;
border-top-left-radius:2px;
border-top-right-radius:2px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 rgb(226,236,241), stop: 0.3 rgb(160,160,160), stop: 1 rgb(120,120,120));
border:1px;
border-radius:5px;
padding:2px 4px;
}
QToolButton#btnTool:pressed{ /* */
color:rgb(255, 255, 255);
min-height:20;
border-style:solid;
border-top-left-radius:2px;
border-top-right-radius:2px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 rgb(226,236,241), stop: 0.3 rgb(190,190,190), stop: 1 rgb(160,160,160));
border:1px;
border-radius:5px;
padding:2px 4px;
}
QToolButton#btnTool:checked{ /* */
color:rgb(255, 255, 255);
min-height:20;
border-style:solid;
border-top-left-radius:2px;
border-top-right-radius:2px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 rgb(226,236,241), stop: 0.3 rgb(190,190,190), stop: 1 rgb(160,160,160));
border:1px;
border-radius:5px;
padding:2px 4px;
}
QMenu::icon:checked { background: #a3d1ff; border: 1px solid #3399ff; position: absolute; top: 1px; right: 1px; bottom: 1px; left: 1px; }