nirvn b921378964 [themes] Adjust Night Mapping and Blend of Gray to improve display on windows
Fixes the combo box drop down list clipping text, as well as
the spinbox's up and down arrow.

Turns out having a single theme QSS that looks great across platforms
isn't straightforward.
2019-01-04 10:00:33 +07:00

705 lines
16 KiB
Plaintext

QToolTip
{
border: 1px solid #222;
background-color: @itemdarkbackground;
color: @itembackground;
}
QWindow, QMainWindow, QWidget
{
color: @text;
background-color: @background;
}
QWidget:item:hover
{
background-color: @selection;
color: @text;
}
QWidget:item:selected
{
background-color: @selection;
color: @text;
}
QMenuBar {
background-color: @background;
color: @text;
}
QMenuBar::item
{
background: transparent;
}
QMenuBar::item:selected
{
background: @background;
color: @text;
}
QMenuBar::item:pressed
{
background: @background;
color: @text;
}
QAbstractSpinBox {
padding: 0.12em 0em 0.12em 0.12em;
border: 1px solid #222;
border-radius:0px;
background-color: @darkgradient;
color:@text;
}
QAbstractSpinBox::up-button {
subcontrol-origin: border;
subcontrol-position: top right;
padding-top:0em;
padding-right:0.05em;
width: 0.8em;
height: 0.8em;
image: url(@theme_path/icons/arrow-up.svg);
}
QAbstractSpinBox::down-button {
subcontrol-origin: border;
subcontrol-position: bottom right;
padding-top:0.2em;
padding-right:0.05em;
width: 0.8em;
height: 0.8em;
image: url(@theme_path/icons/arrow-down.svg);
}
/* ==================================================================================== */
/* MENU */
/* ==================================================================================== */
QMenu
{
background: #444;
border: 1px solid #222;
padding: 0.2em;
padding-right: 0em;
}
QMenu::item
{
background: transparent;
padding: 0.2em 1.3em 0.2em 1.3em;
}
QMenu::item:disabled
{
color: #555;
background: transparent;
padding: 0.2em 1.3em 0.2em 1.3em;
}
QMenu::item:selected
{
background-color: @selection;
color: @text;
}
QWidget:disabled
{
color: #404040;
background-color: @background;
}
QLineEdit
{
padding: 0.12em;
border: 1px solid #111;
background-color: #888;
color: #111;
}
QTextEdit, QPlainTextEdit
{
padding: 0.12em;
border-width: 1px;
border-color: @itemdarkbackground;
border-style: solid;
border-radius: 0px;
background-color:@itembackground;
color:@text;
}
QPushButton
{
padding: 0.12em;
border-width: 1px;
border-color: @itembackground;
border-style: solid;
border-radius: 0px;
background-color:@background;
color:@text;
}
QToolButton
{
padding: 0.12em;
border-width: 1px;
border-color: @itembackground;
border-style: solid;
border-radius: 0px;
background-color:@itemdarkbackground;
color:@text;
}
QToolButton[popupMode="1"]
{
padding-right: 0.9em;
}
QToolButton::menu-button {
width: 0.8em;
border-width: 1px;
border-color: none;
border-radius: 0px;
background:@itemdarkbackground;
}
QToolButton::hover, QToolButton::menu-button::hover
{
border-width: 1px;
border-color: #1e1e1e;
border-style: solid;
border-radius: 0px;
background-color: none;
}
QToolButton:checked
{
border: 1px solid @focus;
}
QToolButton::menu-arrow
{
image: url(@theme_path/icons/arrow-down.svg);
width: 0.8em;
height: 1.2em;
}
QToolBar QToolButton, QToolButton::menu-button
{
border-color: rgba(0,0,0,0);
background-color: none;
}
/* ==================================================================================== */
/* COMBO BOX */
/* ==================================================================================== */
QComboBox {
selection-background-color: @selection;
background-color: @darkgradient;
color:@text;
border-style: solid;
border: 1px solid #1e1e1e;
border-radius: 0px;
padding: 0.12em 1.2em 0.12em 0.12em;
}
QComboBox:hover,QPushButton:hover,QToolButton:hover,QAbstractSpinBox:hover {
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #565656,stop: 1 #464646);
}
QComboBox:on {
padding: 0.12em;
padding-left: 0.2em;
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #555,
stop: 0.1 #4C4C4C,
stop: 0.5 #464646,
stop: 0.9 #414141,
stop: 1 #444);
selection-background-color: @selection;
}
QComboBox:editable {
background-color: @darkgradient;
}
QComboBox:editable QLineEdit {
border-color: @itemdarkbackground;
background-color: @itemdarkbackground;
color:@text;
}
QComboBox QAbstractItemView, QComboBox QListView {
border: none;
border-radius: 0px;
padding: 0.12em;
background: @itemdarkbackground;
color: @text;
selection-background-color: @selection;
selection-color: @text;
}
QComboBox::drop-down {
subcontrol-origin: padding;
subcontrol-position: top right;
width: 0.8em;
border: 0px;
}
QComboBox::down-arrow
{
image: url(@theme_path/icons/arrow-down.svg);
width: 0.8em;
height: 1.2em;
}
QComboBox:item {
padding-left: 1.3em;
height:1.25em;
}
QComboBox:item:selected {
padding-left: 1.3em;
height:1.25em;
}
QComboBox:item:checked {
padding-left: 1.3em;
height:1.25em;
}
QLineEdit:focus
{
border: 1px solid @focus;
}
QTextEdit:focus
{
border: 1px solid @focus;
}
/* ==================================================================================== */
/* SCROLL BAR */
/* ==================================================================================== */
QScrollBar:horizontal {
background-color: #333;
height: 0.5em;
margin: 0px;
padding: 0px;
}
QScrollBar::handle:horizontal {
border: 1px solid #111;
background: @itembackground;
}
QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal,
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
width: 0px;
background: transparent;
}
QScrollBar:vertical {
background-color: #333;
width: 0.5em;
margin: 0;
}
QScrollBar::handle:vertical {
border: 1px solid #111;
background: @itembackground;
}
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical,
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
height: 0px;
background: transparent;
}
QSizeGrip
{
width: 0.1em;
}
QHeaderView::section
{
/*background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #616161, stop: 0.5 #505050, stop: 0.6 #434343, stop:1 #656565);*/
color: @text;
padding-left: 0.5em;
border: 1px solid #6c6c6c;
}
QDockWidget
{
titlebar-close-icon: url(@theme_path/icons/close.svg);
}
QDockWidget::separator
{
border: 1px solid red;
}
QDockWidget::title
{
text-align: center;
spacing: 0.1em; /* spacing between items in the tool bar */
background-color: @background;
font-weight: bold;
}
QDockWidget::close-button, QDockWidget::float-button
{
text-align: center;
spacing: 1px; /* spacing between items in the tool bar */
}
QDockWidget::close-button:hover, QDockWidget::float-button:hover
{
background: #242424;
}
QDockWidget::close-button:pressed, QDockWidget::float-button:pressed
{
padding: 1px -1px -1px 1px;
}
QMainWindow::separator
{
/*background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #161616, stop: 0.5 #151515, stop: 0.6 #212121, stop:1 #343434);*/
color: white;
padding-left: 0.2em;
border: 0px solid #4c4c4c;
spacing: 0.1m; /* spacing between items in the tool bar */
}
QMainWindow::separator:hover
{
/*background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #d7801a, stop:0.5 #b56c17 stop:1 #ffa02f);*/
color: white;
padding-left: 0.2em;
border: 1px solid #6c6c6c;
spacing: 0.1em; /* spacing between items in the tool bar */
}
QToolBar {
background: @background;
border: 1px solid @background;
}
QToolBar::handle:horizontal
{
image: url(@theme_path/icons/handle-horizontal.svg);
width: 0.2em;
height: 0.5em;
}
QToolBar::handle:vertical
{
image: url(@theme_path/icons/handle-vertical.svg);
width: 0.5em;
height: 0.2em;
}
QToolBar::separator:horizontal
{
image: url(@theme_path/icons/separator-horizontal.svg);
width: 0.2em;
height: 0.5em;
}
QToolBar::separator:vertical
{
image: url(@theme_path/icons/separator-vertical.svg);
width: 0.5em;
height: 0.2em;
}
QMenu::separator
{
height: 2px;
border:none;
border-bottom:1px solid @itemdarkbackground;
padding-left: 4px;
margin-left: 10px;
margin-right: 5px;
}
QProgressBar
{
border: 2px solid grey;
text-align: center;
}
QProgressBar::chunk
{
background-color: @focus;
width: 3px;
margin: 1px;
}
QTabWidget::pane {
border: 1px solid @itemdarkbackground;
}
QTabBar::tab {
color: @text;
border: 1px solid @itemdarkbackground;
border-bottom: none;
background-color: @background;
padding-left: 0.8em;
padding-right: 0.8em;
padding-top: 0.1em;
padding-bottom: 0.1em;
margin-right: -0.05em;
}
QTabBar::tab:last
{
margin-right: 0; /* the last selected tab has nothing to overlap with on the right */
}
QTabBar::tab:first:!selected
{
margin-left: 0px; /* the last selected tab has nothing to overlap with on the right */
}
QTabBar::tab:bottom {
border-top: none;
border-bottom: 1px solid @itemdarkbackground;
}
QTabBar::tab:!selected
{
margin-top: 0.3em;
}
QTabBar::tab:selected
{
margin-bottom: 0px;
}
QTabBar::tab:!selected:hover
{
/*border-top: 2px solid @selection;
padding-bottom: 3px;*/
/*background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:1 #212121, stop:0.4 #343434, stop:0.2 #343434, stop:0.1 #ffaa00);*/
}
QGroupBox::indicator:hover,
QCheckBox::indicator:hover,
QRadioButton::indicator:hover
{
border: 1px solid @selection;
}
/* ==================================================================================== */
/* GROUP */
/* ==================================================================================== */
QGroupBox::title {
color: @textlight;
}
QGroupBox::indicator:unchecked {
border: 1px solid @background;
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
width:0.8em;
height:0.8em;
}
QGroupBox::indicator:checked {
border: 1px solid @background;
image: url(@theme_path/icons/qcheckbox-checked.svg);
width:0.8em;
height:0.8em;
}
/* ==================================================================================== */
/* RADIO BUTTON */
/* ==================================================================================== */
QRadioButton::indicator:unchecked {
border: 1px solid @background;
image: url(@theme_path/icons/qradiobox-unchecked.svg);
width:0.8em;
height:0.8em;
}
QRadioButton::indicator:checked {
border: 1px solid @background;
image: url(@theme_path/icons/qradiobox-checked.svg);
width:0.8em;
height:0.8em;
}
/* ==================================================================================== */
/* CHECKBOX */
/* ==================================================================================== */
QCheckBox::indicator:unchecked {
border: 1px solid @background;
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
width:0.8em;
height:0.8em;
}
QCheckBox::indicator:checked {
border: 1px solid @background;
image: url(@theme_path/icons/qcheckbox-checked.svg);
width:0.8em;
height:0.8em;
}
/* ==================================================================================== */
/* SLIDER */
/* ==================================================================================== */
QSlider::groove:horizontal,
QSlider::groove:vertical {
border: 1px solid @itemdarkbackground;
height: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
background-color: @itembackground;
margin: 2px 0;
}
QSlider::handle:horizontal {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
border: 1px solid itemdarkbackground;
width: 1em;
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
border-radius: 0px;
}
QSlider::handle:vertical {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
border: 1px solid itemdarkbackground;
height: 1em;
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
border-radius: 0px;
}
/* ==================================================================================== */
/* OTHER */
/* ==================================================================================== */
QAbstractItemView, QListView
{
background-color: @itembackground;
alternate-background-color: @background;
color: @text;
border: none;
border-radius: 0px;
padding: 1px;
selection-color: @text;
selection-background-color: @selection;
}
QAbstractItemView::selected, QListView::selected {
border: 0px;
outline: none;
}
/* ==================================================================================== */
/* TREE VIEW */
/* ==================================================================================== */
QTreeView {
border: 1px solid @itemdarkbackground;
alternate-background-color: @background;
}
QTreeView::item, QTreeView::branch {
background: transparent;
color: @textlight;
}
QTreeView::item:hover, QTreeView::branch:hover {
background-color: @toggleoff;
color: @itembackground;
}
QTreeView::item:selected, QTreeView::branch:selected {
background-color: @selection;
color: @textlight;
}
QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
border-image: none;
image: url(@theme_path/icons/caret-right.svg);
}
QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url(@theme_path/icons/caret-down.svg);
}
QgsLayerTreeView::item,
QTreeView#viewGraduated::item,
QTreeView#viewCategories::item,
QTreeView#viewRules::item
{
border-top: 0.5px solid rgba(108,108,108,50);
border-bottom: 0.5px solid rgba(108,108,108,50);
padding: 0.1em 0em 0.1em 0em;
}
QgsLayerTreeView::indicator:unchecked,
QTreeView#viewGraduated::indicator:unchecked,
QTreeView#viewCategories::indicator:unchecked,
QTreeView#viewRules::indicator:unchecked
{
image: url(@theme_path/icons/eye-blocked.svg);
}
QgsLayerTreeView::indicator:checked,
QTreeView#viewGraduated::indicator:checked,
QTreeView#viewCategories::indicator:checked,
QTreeView#viewRules::indicator:checked
{
image: url(@theme_path/icons/eye.svg);
}
/* ==================================================================================== */
/* TABLE VIEW */
/* ==================================================================================== */
QTableView {
color: @text;
}
QHeaderView::section {
background: transparent;
background-color: @background;
color: @text;
border-right: 1px solid @itemdarkbackground;
padding: 0 0 0.1em 0.2em;
}
/* ==================================================================================== */
/* QGIS-SPECIFIC TWEAKS */
/* ==================================================================================== */
QgsColorButton, QgsColorRampButton, QgsSymbolButton, QgsFontButton {
background-color: @darkgradient;
color:@text;
}
QgsMessageBar QLabel, QgsMessageBar QTextEdit, QMessageBar QToolButton, QMessageBar QToolButton::menu-button {
background: transparent;
border: none;
padding: 0px;
}
QgsPropertyOverrideButton {
padding: 0px;
}
QListWidget#mOptionsListWidget {
background-color: @itembackground;
color: @text;
}
QListWidget#mOptionsListWidget::item {
padding: 0.1em;
}