Skip to content

Commit

Permalink
[themes] Adjust Night Mapping and Blend of Gray to improve display on…
Browse files Browse the repository at this point in the history
… 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 b921378
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 33 deletions.
36 changes: 20 additions & 16 deletions resources/themes/Blend of Gray/style.qss
Expand Up @@ -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;
Expand All @@ -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);
}

Expand All @@ -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);
}

Expand Down Expand Up @@ -114,7 +114,7 @@ QWidget:disabled

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

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

QToolButton
{
padding: 0.1em;
padding: 0.12em;
border-width: 1px;
border-color: @itemdarkbackground;
border-style: solid;
Expand Down Expand Up @@ -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;
}


Expand All @@ -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,
Expand All @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -426,6 +426,10 @@ QProgressBar::chunk
margin: 1px;
}

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

QTabBar::tab {
color: @text;
border: 1px solid @itemdarkbackground;
Expand Down
38 changes: 21 additions & 17 deletions resources/themes/Night Mapping/style.qss
Expand Up @@ -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;
Expand All @@ -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);
}

Expand All @@ -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);
}

Expand Down Expand Up @@ -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;
Expand All @@ -133,7 +133,7 @@ QTextEdit, QPlainTextEdit

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

QToolButton
{
padding: 0.1em;
padding: 0.12em;
border-width: 1px;
border-color: @itembackground;
border-style: solid;
Expand Down Expand Up @@ -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;
}


Expand All @@ -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,
Expand All @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -435,6 +435,10 @@ QProgressBar::chunk
margin: 1px;
}

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

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

0 comments on commit b921378

Please sign in to comment.