1 Star 0 Fork 5

zjzcn/常用QSS样式文件

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
blueglass.qss 8.03 KB
一键复制 编辑 原始数据 按行查看 历史
王威 提交于 2024-09-12 08:39 . ok
QWidget{border: 0px; background-color: rgba(250, 250, 250, 255); selection-background-color: rgba(0,0,255,75);background-clip: border;outline: 0; }
QDialog { border-radius: 3px; border: 1px;background-color: rgba(250, 250, 250, 255)}
QMenuBar{ background-color: white; border-bottom: 0px solid black; }
QMenuBar::item:selected {background:rgba(0,0,255,75) }
QMenuBar::item:pressed {background: rgba(0,0,255,100) }
QToolBar{ background-color: #fafafa; border: 0px solid #fafafa; }
QToolBar::handle{
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #fafafa, stop: 1.0 #cbcbff);
border: 0px solid #fafafa;
}
QLabel{color: rgba(0, 0, 0, 225) }
/** separator goes red on hover, makes it easier to find/move */
QMainWindow::separator {
background: #fafafa;
width: 4px; /* when vertical */
height: 4px; /* when horizontal */
}
QMainWindow::separator:hover {
background: red;
}
/** Dock Widgets e.g. Time Manager */
QDockWidget {border: 0px solid;background :white; }
QDockWidget::close-button, QDockWidget::float-button {border: 0px solid transparent;padding: 0px;}
QDockWidget::close-button:hover, QDockWidget::float-button:hover {background: #CC0000;}
QDockWidget::close-button:pressed, QDockWidget::float-button:pressed {padding: 1px -1px -1px 1px;}
QDockWidget::title {
text-align: left; /* align the text to the left */
background: #9b9bff;
padding-left: 5px;
}
/** Menus */
QMenu::icon{ margin-left: 5px; margin-right: 5px; }
QMenu::item:pressed{background-color:rgba(0,0,255,75); }
QMenu::item:hover{background-color:rgba(0,0,255,50); }
QLineEdit {
border: 1px solid gray;
border-radius: 1px;
padding: 0 8px;
background: white;
selection-background-color: darkgray;
border-color: darkgray
}
QLineEdit:read-only {
background: lightblue;
}
QTextEdit, QListView {
background-color: white;
border: 1px solid gray;
background-attachment: scroll;
}
QProgressBar {border: 1px solid grey;border-radius: 3px;}
QProgressBar::chunk {background-color: rgba(0,0,255,50);width: 5px;height:10px;}
/** Scroll bars */
QScrollBar:horizontal{
height: 15px;
margin: 0px 11px 0px 11px;
border: 0px solid #3A3939;
border-radius: 6px;
background-color: #3A3939;
}
QScrollBar::handle:horizontal{
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #fafafa, stop: 1.0 #9b9bff);
min-width: 5px;
border-radius: 3px;
}
QScrollBar::down-arrow:horizontal{background: none;display:none;}
QScrollBar::up-arrow:horizontal{background: none;display:none;}
QScrollBar::add-page:horizontal{background: none;display:none;}
QScrollBar::sub-page:horizontal{background: none;display:none;}
QScrollBar:vertical{
background-color: #3A3939;
width: 15px;
margin: 11px 0 11px 0;
border: 0px solid #3A3939;
border-radius: 6px;
}
QScrollBar::handle:vertical{
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #fafafa, stop: 1.0 #9b9bff);
min-height: 25px;border-radius: 5px;
}
QScrollBar::up-arrow:vertical{background: none;display:none;}
QScrollBar::down-arrow:vertical{background: none;display:none;}
QScrollBar::add-page:vertical{background: none;display:none;}
QScrollBar::sub-page:vertical{background: none;display:none;}
/**
Aim of this is to increase default height of QgsMessageBar. This is not directly stylable for now, so this hack is commented out for now; leaving in here
in the hope I remember to style this when it's stylable :)
QFrame QFrame {
background-color: #fafafa;
min-height: 100px;
margin:0px;
padding:0px;
}
*/
/**
Checkboxes & Radio Buttons
*/
QRadioButton::indicator:checked {
background-color:#9b9bff;
border:1px solid black;
border-radius: 8px;
}
QRadioButton::indicator:unchecked {
background-color:#fafafa;
border:1px solid black;
border-radius: 8px;
}
QCheckBox::indicator:checked {
background-color:#9b9bff;
border:1px solid black;
}
QCheckBox::indicator:unchecked {
background-color:#fafafa;
border:1px solid black;
}
/**
Toolbuttons
*/
QToolButton { /* all types of tool button */
border: 6px solid #fafafa;
border-radius: 15px;
}
QToolButton[popupMode="1"] {
padding-right: 20px;
}
QToolButton:hover {
border: 2px solid #9b9bff;
/*background-color: #9b9bff;*/
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #fafafa, stop: 1.0 #9b9bff);
padding:0px;
}
QToolButton:pressed {
border: 6px solid #fafafa;
border-radius: 15px;
}
QToolButton:checked {
border: 3px solid black;
border-radius: 15px;
background-color: #9b9bff;
padding:0px;
}
QToolButton::menu-button {
border: 0px solid black;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
width: 16px;
}
QToolButton::menu-arrow:open {
top: 1px; left: 1px;
border: 0px solid gray;
}
/** PushButtons **/
QPushButton {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #fafafa, stop: 1.0 #9b9bff);
border-style: outset;
border-width: 1px;
border-radius: 5px;
border-color: black;
min-width: 2em;
padding: 6px;
}
QPushButton::hover {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #9b9bff, stop: 1.0 #fafafa);
border-style: outset;
border-width: 1px;
border-radius: 5px;
border-color: black;
min-width: 2em;
padding: 6px;
}
QPushButton::disabled {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #ffffff22, stop: 1.0 #9b9bff22);
border-style: dotted;
border-width: 1px;
border-radius: 5px;
border-color: #99999933;
min-width: 2em;
padding: 6px;
color:#33333;
}
/** Other widgets */
QTableWidget {
border: 1px solid #E6E6E6;
selection-background-color: rgba(0,0,255,50);
}
QTableWidget QTableCornerButton::section {
border: 1px solid #E6E6E6;;
}
QListView {
show-decoration-selected: 1; /* make the selection span the entire width of the view */
border: 1px solid #E6E6E6;
}
QListView::item:alternate {
background: #EEEEEE;
border: 1px solid #E6E6E6;
}
QListView::item:selected {
border: 0px solid #6a6ea9;
}
QListView::item:selected:!active {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #ABAFE5, stop: 1 #8588B2);
}
QListView::item:selected:active {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #6a6ea9, stop: 1 #888dd9);
}
QListView::item:hover {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #FAFBFE, stop: 1 #DCDEF1);
}
/** Combo boxes */
QComboBox {
border: 1px solid ;
border-color: darkgray ;
border-radius: 3px;
padding: 1px 18px 1px 3px;
min-width: 6em;
}
QTabBar::tab {
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #cccccc, stop: 1.0 #fafafa);;
border:1px solid grey;
border-top-left-radius:12px;
border-top-right-radius:12px;
padding:4px;
}
QTabBar::tab:selected {
border-bottom:none;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #9b9bff, stop: 1.0 #fafafa);
}
/** checkbox inside of a drop-down section XXX*/
QGroupBox::indicator {
width: 23px;
height: 23px;
}
QGroupBox::indicator:checked {
background-color:#9b9bff;
border:1px solid black;
}
QGroupBox::indicator:unchecked {
background-color:#fafafa;
border:1px solid black;
}
/** group boxes */
QGroupBox {
background-color: rgba(250, 250, 250, 255);
border: 1px solid gray;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-radius: 3px;
margin-top: 4ex;
}
QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top left;
padding: 0 6px;
background-color:rgba(250, 250, 250, 255);
}
/**
spinbox - need to style QAbstractSpinbox or some spinboxes aren't styled...
*/
QAbstractSpinBox {
border:1px solid darkgray;
padding-bottom:4px;
padding-top:2px;
padding-right:8px;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/zjzcn/common-qss-style-files.git
git@gitee.com:zjzcn/common-qss-style-files.git
zjzcn
common-qss-style-files
常用QSS样式文件
master

搜索帮助