Skip to content

Commit 440fcc3

Browse files
committed
Night Mapping updates from Mathieu
1 parent 91211d0 commit 440fcc3

File tree

3 files changed

+117
-49
lines changed

3 files changed

+117
-49
lines changed

resources/themes/Night Mapping/style.qss

Lines changed: 104 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ QMenuBar::item:selected
3636
{
3737
/*
3838
background: transparent;
39-
border: 1px solid #ffaa00;
39+
border: 1px solid @hover;
4040
*/
4141
background: #444;
4242
}
@@ -118,10 +118,9 @@ QLineEdit
118118
color: #111;
119119
}
120120

121-
QPushButton
121+
QPushButton
122122
{
123123
color: #b1b1b1;
124-
/* background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #565656, stop: 0.1 #525252, stop: 0.5 #4e4e4e, stop: 0.9 #4a4a4a, stop: 1 #464646);*/
125124
border-width: 1px;
126125
border-color: #1e1e1e;
127126
border-style: solid;
@@ -131,17 +130,49 @@ QPushButton
131130
padding-right: 5px;
132131
}
133132

134-
QPushButton:pressed
133+
QToolButton
135134
{
136-
/* background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2d2d2d, stop: 0.1 #2b2b2b, stop: 0.5 #292929, stop: 0.9 #282828, stop: 1 #252525);*/
135+
color: #b1b1b1;
136+
padding: 3px 5px 3px 5px;
137+
font-size: 12px;
138+
border-width: 1px;
139+
border-color: #1e1e1e;
140+
border-style: solid;
141+
background-color:@itembackground;
142+
}
143+
QToolButton[popupMode="1"]
144+
{
145+
padding-right: 18px;
146+
}
147+
QToolButton::menu-button {
148+
width: 14px;
149+
border-width: 1px;
150+
border-color: none;
151+
background: none;
152+
}
153+
QToolButton::hover, QToolButton::menu-button::hover
154+
{
155+
border-width: 1px;
156+
border-color: #1e1e1e;
157+
border-style: solid;
158+
background-color:@itembackground;
159+
}
160+
QToolButton::menu-arrow
161+
{
162+
image: url(icons/down_arrow.png);
163+
}
164+
QToolBar QToolButton, QToolButton::menu-button
165+
{
166+
border:0;
167+
background-color: none;
137168
}
138169

139170
/* ==================================================================================== */
140171
/* COMBO BOX */
141172
/* ==================================================================================== */
142173

143174
QComboBox {
144-
selection-background-color: #ffaa00;
175+
selection-background-color: @hover;
145176
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #565656, stop: 0.1 #525252, stop: 0.5 #4e4e4e, stop: 0.9 #4a4a4a, stop: 1 #464646);
146177
border-style: solid;
147178
border: 1px solid #1e1e1e;
@@ -167,7 +198,7 @@ QComboBox:on {
167198
stop: 0.5 #464646,
168199
stop: 0.9 #414141,
169200
stop: 1 #444);
170-
selection-background-color: #ffaa00;
201+
selection-background-color: @hover;
171202
}
172203

173204
QComboBox:editable {
@@ -216,7 +247,7 @@ QScrollBar:horizontal {
216247

217248
QScrollBar::handle:horizontal {
218249
border: 1px solid #111;
219-
background: #535353;
250+
background: @itembackground;
220251
}
221252

222253
QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal,
@@ -233,7 +264,7 @@ QScrollBar:vertical {
233264

234265
QScrollBar::handle:vertical {
235266
border: 1px solid #111;
236-
background: #535353;
267+
background: @itembackground;
237268
}
238269

239270
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical,
@@ -412,60 +443,86 @@ QTabBar::tab:selected
412443

413444
QTabBar::tab:!selected:hover
414445
{
415-
/*border-top: 2px solid #ffaa00;
446+
/*border-top: 2px solid @hover;
416447
padding-bottom: 3px;*/
417448
/*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);*/
418449
}
419450

451+
QGroupBox::indicator:hover,
452+
QCheckBox::indicator:hover,
453+
QRadioButton::indicator:hover
454+
{
455+
border: 1px solid @hover;
456+
}
457+
420458
/* ==================================================================================== */
421-
/* RADIO BUTTON */
459+
/* GROUP */
422460
/* ==================================================================================== */
423461

424-
QGroupBox::indicator:unchecked,
425-
QGroupBox::indicator:checked,
426-
QCheckBox::indicator:checked,
427-
QCheckBox::indicator:unchecked
428-
QRadioButton::indicator:checked,
429-
QRadioButton::indicator:unchecked{
430-
color: #b1b1b1;
431-
background-color: @background;
432-
border: 1px solid #b1b1b1;
462+
QGroupBox::title { color:#FFFFFF; }
463+
464+
QGroupBox::indicator:unchecked {
465+
background-color: @toggleoff;
433466
}
434467

435-
QGroupBox::indicator:checked,
436-
QCheckBox::indicator:checked
437-
{
438-
background-color: qradialgradient(
439-
cx: 0.5, cy: 0.5,
440-
fx: 0.5, fy: 0.5,
441-
radius: 1.0,
442-
stop: 0.25 #ffaa00,
443-
stop: 0.3 @background
444-
);
468+
QGroupBox::indicator:checked {
469+
background-color: @toggleon;
470+
}
471+
/* ==================================================================================== */
472+
/* RADIO BUTTON */
473+
/* ==================================================================================== */
474+
475+
QRadioButton::indicator:unchecked {
476+
background-color: @toggleoff;
477+
border-radius:10px;
445478
}
479+
446480
QRadioButton::indicator:checked {
447-
background-color: qradialgradient(
448-
cx: 0.5, cy: 0.5,
449-
fx: 0.5, fy: 0.5,
450-
radius: 1.0,
451-
stop: 0.25 #ffaa00,
452-
stop: 0.3 @background
453-
);
481+
background-color: @toggleon;
482+
border-radius:10px;
454483
}
455484

456-
QRadioButton::indicator
457-
{
485+
/* ==================================================================================== */
486+
/* CHECKBOX */
487+
/* ==================================================================================== */
488+
489+
QCheckBox::indicator:unchecked {
490+
background-color: @toggleoff;
458491
}
459492

460-
QGroupBox::indicator:hover,
461-
QCheckBox::indicator:hover,
462-
QRadioButton::indicator:hover
463-
{
464-
border: 1px solid #ffaa00;
493+
QCheckBox::indicator:checked {
494+
background-color: @toggleon;
465495
}
466496

467497
/* ==================================================================================== */
468-
/* CHECKBOX */
498+
/* SLIDER */
499+
/* ==================================================================================== */
500+
501+
QSlider::groove:horizontal,
502+
QSlider::groove:vertical {
503+
border: 1px solid #262626;
504+
height: 8px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
505+
background-color: @itembackground;
506+
margin: 2px 0;
507+
}
508+
509+
QSlider::handle:horizontal {
510+
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
511+
border: 1px solid #5c5c5c;
512+
width: 18px;
513+
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
514+
border-radius: 3px;
515+
}
516+
QSlider::handle:vertical {
517+
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
518+
border: 1px solid #5c5c5c;
519+
height: 18px;
520+
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
521+
border-radius: 3px;
522+
}
523+
524+
/* ==================================================================================== */
525+
/* OTHER */
469526
/* ==================================================================================== */
470527

471528
QAbstractItemView
@@ -497,12 +554,12 @@ QTreeView::item, QTreeView::branch {
497554
}
498555

499556
QTreeView::item:hover, QTreeView::branch:hover {
500-
background-color: #507098;
557+
background-color: @toggleoff;
501558
color: #DDD;
502559
}
503560

504561
QTreeView::item:selected, QTreeView::branch:selected {
505-
background-color: #507098;
562+
background-color: @selection;
506563
color: #DDD;
507564
}
508565

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
@background: #323232
2+
@itembackground: #535353
23
@text: #aaa;
4+
@toggleoff: #535353
5+
@toggleon: #0f6e00
6+
@hover: #0d7200
7+
@selection: #0f6e00

src/core/qgsapplication.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ class CORE_EXPORT QgsApplication : public QApplication
7676
*/
7777
static QString themeName();
7878

79+
/**
80+
* @brief Set the current UI theme used to style the interface. Use uiThemes() to
81+
* find valid themes to use. Variabels found in variables.qss will be added to the stylesheet
82+
* on load.
83+
* @param themeName The name of the theme.
84+
*/
7985
static void setUITheme( const QString &themeName );
8086

8187
/**
@@ -85,8 +91,8 @@ class CORE_EXPORT QgsApplication : public QApplication
8591
static QString uiThemeName();
8692

8793
/**
88-
* @brief All themes found in the application resources folder
89-
* and ~/.qgis2/themes folder. The path is to the root folder for the theme
94+
* @brief All themes found in ~/.qgis2/themes folder.
95+
* The path is to the root folder for the theme
9096
* @note Valid theme folders must contain a style.qss file.
9197
* @return A hash of theme name and theme path. Valid theme folders contain style.qss
9298
*/

0 commit comments

Comments
 (0)