Skip to content
Permalink
Browse files

[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.
  • Loading branch information
nirvn committed Jan 4, 2019
1 parent d59a346 commit b9213789649718daf619ad0b75b5f7b5737d8dc8
Showing with 41 additions and 33 deletions.
  1. +20 −16 resources/themes/Blend of Gray/style.qss
  2. +21 −17 resources/themes/Night Mapping/style.qss
@@ -46,7 +46,7 @@ QMenuBar::item:pressed
}

QAbstractSpinBox {
padding: 0.1em 0em 0.1em 0.1em;
padding: 0.12em 0em 0.12em 0.12em;
border: 1px solid #222;
border-radius: 0.2em;
background-color: @darkgradient;
@@ -56,10 +56,10 @@ QAbstractSpinBox {
QAbstractSpinBox::up-button {
subcontrol-origin: border;
subcontrol-position: top right;
padding-top:-0.2em;
padding-top:0em;
padding-right:0.05em;
width: 0.8em;
height: 1.2em;
height: 0.8em;
image: url(@theme_path/icons/arrow-up.svg);
}

@@ -69,7 +69,7 @@ QAbstractSpinBox::down-button {
padding-top:0.2em;
padding-right:0.05em;
width: 0.8em;
height: 1.2em;
height: 0.8em;
image: url(@theme_path/icons/arrow-down.svg);
}

@@ -114,7 +114,7 @@ QWidget:disabled

QLineEdit, QTextEdit, QPlainTextEdit
{
padding: 0.1em;
padding: 0.12em;
border-width: 1px;
border-color: @itemdarkbackground;
border-style: solid;
@@ -125,7 +125,7 @@ QLineEdit, QTextEdit, QPlainTextEdit

QPushButton
{
padding: 0.1em;
padding: 0.12em;
border-width: 1px;
border-color: @itemdarkbackground;
border-style: solid;
@@ -136,7 +136,7 @@ QPushButton

QToolButton
{
padding: 0.1em;
padding: 0.12em;
border-width: 1px;
border-color: @itemdarkbackground;
border-style: solid;
@@ -190,7 +190,7 @@ QComboBox {
border-style: solid;
border: 1px solid #1e1e1e;
border-radius: 0.2em;
padding: 0.1em 1em 0.1em 0.1em;
padding: 0.12em 1.2em 0.12em 0.12em;
}


@@ -199,7 +199,7 @@ QComboBox:hover,QPushButton:hover,QToolButton:hover,QAbstractSpinBox:hover {
}

QComboBox:on {
padding: 0.1em;
padding: 0.12em;
padding-left: 0.2em;
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #555,
@@ -221,7 +221,7 @@ QComboBox:editable QLineEdit {
QComboBox QAbstractItemView, QComboBox QListView {
border: none;
border-radius: 0;
padding: 0.1em;
padding: 0.12em;
background: @itemdarkbackground;
color: @itembackground;
selection-background-color: @selection;
@@ -242,16 +242,16 @@ QComboBox::down-arrow
}

QComboBox:item {
padding-left: 1.5em;
height:1.2em;
padding-left: 1.3em;
height:1.25em;
}
QComboBox:item:selected {
padding-left: 1.5em;
height:1.2em;
padding-left: 1.3em;
height:1.25em;
}
QComboBox:item:checked {
padding-left: 1.5em;
height:1.2em;
padding-left: 1.3em;
height:1.25em;
}

QLineEdit:focus
@@ -426,6 +426,10 @@ QProgressBar::chunk
margin: 1px;
}

QTabWidget::pane {
border: 1px solid @itemdarkbackground;
}

QTabBar::tab {
color: @text;
border: 1px solid @itemdarkbackground;
@@ -46,7 +46,7 @@ QMenuBar::item:pressed
}

QAbstractSpinBox {
padding: 0.1em 0em 0.1em 0.1em;
padding: 0.12em 0em 0.12em 0.12em;
border: 1px solid #222;
border-radius:0px;
background-color: @darkgradient;
@@ -56,10 +56,10 @@ QAbstractSpinBox {
QAbstractSpinBox::up-button {
subcontrol-origin: border;
subcontrol-position: top right;
padding-top:-0.2em;
padding-top:0em;
padding-right:0.05em;
width: 0.8em;
height: 1.2em;
height: 0.8em;
image: url(@theme_path/icons/arrow-up.svg);
}

@@ -69,7 +69,7 @@ QAbstractSpinBox::down-button {
padding-top:0.2em;
padding-right:0.05em;
width: 0.8em;
height: 1.2em;
height: 0.8em;
image: url(@theme_path/icons/arrow-down.svg);
}

@@ -114,15 +114,15 @@ QWidget:disabled

QLineEdit
{
padding: 0.1em;
padding: 0.12em;
border: 1px solid #111;
background-color: #888;
color: #111;
}

QTextEdit, QPlainTextEdit
{
padding: 0.1em;
padding: 0.12em;
border-width: 1px;
border-color: @itemdarkbackground;
border-style: solid;
@@ -133,7 +133,7 @@ QTextEdit, QPlainTextEdit

QPushButton
{
padding: 0.1em;
padding: 0.12em;
border-width: 1px;
border-color: @itembackground;
border-style: solid;
@@ -144,7 +144,7 @@ QPushButton

QToolButton
{
padding: 0.1em;
padding: 0.12em;
border-width: 1px;
border-color: @itembackground;
border-style: solid;
@@ -198,7 +198,7 @@ QComboBox {
border-style: solid;
border: 1px solid #1e1e1e;
border-radius: 0px;
padding: 0.1em 1em 0.1em 0.1em;
padding: 0.12em 1.2em 0.12em 0.12em;
}


@@ -207,7 +207,7 @@ QComboBox:hover,QPushButton:hover,QToolButton:hover,QAbstractSpinBox:hover {
}

QComboBox:on {
padding: 0.1em;
padding: 0.12em;
padding-left: 0.2em;
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #555,
@@ -230,7 +230,7 @@ QComboBox:editable QLineEdit {
QComboBox QAbstractItemView, QComboBox QListView {
border: none;
border-radius: 0px;
padding: 0.1em;
padding: 0.12em;
background: @itemdarkbackground;
color: @text;
selection-background-color: @selection;
@@ -251,16 +251,16 @@ QComboBox::down-arrow
}

QComboBox:item {
padding-left: 1.5em;
height:1.2em;
padding-left: 1.3em;
height:1.25em;
}
QComboBox:item:selected {
padding-left: 1.5em;
height:1.2em;
padding-left: 1.3em;
height:1.25em;
}
QComboBox:item:checked {
padding-left: 1.5em;
height:1.2em;
padding-left: 1.3em;
height:1.25em;
}

QLineEdit:focus
@@ -435,6 +435,10 @@ QProgressBar::chunk
margin: 1px;
}

QTabWidget::pane {
border: 1px solid @itemdarkbackground;
}

QTabBar::tab {
color: @text;
border: 1px solid @itemdarkbackground;

0 comments on commit b921378

Please sign in to comment.
You can’t perform that action at this time.