Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[themes] Properly style table/list view headers
  • Loading branch information
nirvn committed Feb 11, 2019
1 parent 81637a5 commit 99a708e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 20 deletions.
2 changes: 1 addition & 1 deletion resources/themes/Night Mapping/palette.txt
@@ -1,5 +1,5 @@
0:#aaaaaa
2:#535353
2:#323232
5:#222222
9:#535353
10:#535353
Expand Down
65 changes: 46 additions & 19 deletions resources/themes/Night Mapping/style.qss
Expand Up @@ -317,7 +317,6 @@ QScrollBar:horizontal {
QScrollBar::handle:horizontal {
border: 1px solid @itemdarkbackground;
background: @background;
min-width: 0.8em;
}

QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal,
Expand All @@ -335,7 +334,6 @@ QScrollBar:vertical {
QScrollBar::handle:vertical {
border: 1px solid @itemdarkbackground;
background: @background;
min-height: 0.8em;
}

QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical,
Expand All @@ -350,13 +348,6 @@ 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);
Expand Down Expand Up @@ -630,7 +621,7 @@ QAbstractItemView, QListView
background-color: @itembackground;
alternate-background-color: @background;
color: @text;
border: none;
border: 1px solid @itemdarkbackground;
border-radius: 0px;
padding: 1px;
selection-color: @text;
Expand Down Expand Up @@ -715,20 +706,49 @@ QTableView {
selection-color: @text;
}

QHeaderView::section {

QTableView QTableCornerButton::section {
background-color: @background;
border: 1px solid @itembackground;
}

QHeaderView {
background-color:transparent;
border:0;
}

QHeaderView::section, QHeaderView::section:vertical {
padding: 0.1m 0.2em 0.1em 0.2em;
background: transparent;
background-color: @background;
color: @text;
border-right: 1px solid @itemdarkbackground;
padding: 0 0 0.1em 0.2em;
border: 1px solid @itemdarkbackground;
border-left: 0;
border-top: 0;
}

QToolButton[autoRaise=true]:focus:!pressed {
border:1px solid @focusdark;
QHeaderView::section:vertical {
border: 1px solid @itemdarkbackground;
border-left: 0;
border-top: 0;
}

QToolButton[autoRaise=false]:focus:!pressed {
border:1px solid @focusdark;
QHeaderView::section:last:vertical {
border-bottom: 0;
}

QHeaderView::section:last:horizontal {
border-right: 0;
}

QHeaderView::down-arrow {
width: 1.2em;
image: url(@theme_path/icons/arrow-down.svg);
}

QHeaderView::up-arrow {
width: 1.2em;
image: url(@theme_path/icons/arrow-up.svg);
}

/* ==================================================================================== */
Expand All @@ -737,13 +757,21 @@ QToolButton[autoRaise=false]:focus:!pressed {

QToolButton:focus, QPushButton:focus, QCheckBox:focus, QRadioButton:focus, QGroupBox:focus {
outline:1px solid @focusdark;
outline-radius: 0.2em;
outline-radius: 0;
}

QComboBox:focus, QAbstractSpinBox:focus, QLineEdit:focus, QPlainTextEdit:focus, QTextEdit:focus {
border:1px solid @focusdark;
}

QToolButton[autoRaise=true]:focus:!pressed {
border:1px solid @focusdark;
}

QToolButton[autoRaise=false]:focus:!pressed {
border:1px solid @focusdark;
}

/* ==================================================================================== */
/* QGIS-SPECIFIC TWEAKS */
/* ==================================================================================== */
Expand Down Expand Up @@ -812,7 +840,6 @@ QgsPropertyOverrideButton, QgsPropertyOverrideButton:hover, QgsPropertyOverrideB

QgsPropertyOverrideButton:focus {
border:1px solid @focusdark;
border-radius: 0.2em;
}

QListWidget#mOptionsListWidget {
Expand Down

0 comments on commit 99a708e

Please sign in to comment.