Skip to content

Commit a485ecd

Browse files
authored
Merge pull request #2096 from cyrossignol/gui
gui: Normalize button and input control appearance
2 parents 0cde66c + 619ecc5 commit a485ecd

File tree

6 files changed

+258
-148
lines changed

6 files changed

+258
-148
lines changed

src/Makefile.qt.include

+3-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ RES_ICONS = \
368368
qt/res/icons/icons_light/transactions.svg \
369369
qt/res/icons/icons_native/transactions.svg \
370370
qt/res/icons/icons_light/chevron_down.svg \
371-
qt/res/icons/icons_dark/chevron_down.svg
371+
qt/res/icons/icons_light/chevron_up.svg \
372+
qt/res/icons/icons_dark/chevron_down.svg \
373+
qt/res/icons/icons_dark/chevron_up.svg
372374

373375
RES_IMAGES = \
374376
qt/res/images/about.svg \

src/qt/bitcoin.qrc

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
<file alias="tx_por_ss_sent">res/icons/tx_por_ss_sent.svg</file>
8181
<file alias="message">res/icons/message.svg</file>
8282
<file alias="light_chevron_down">res/icons/icons_light/chevron_down.svg</file>
83+
<file alias="light_chevron_up">res/icons/icons_light/chevron_up.svg</file>
8384
<file alias="dark_chevron_down">res/icons/icons_dark/chevron_down.svg</file>
8485
</qresource>
8586
<qresource prefix="/images">
Loading
Loading

src/qt/res/stylesheets/dark_stylesheet.qss

+119-80
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ QMainWindow {
1212
font-family: "Inter";
1313
}
1414

15-
BitcoinAmountField{
16-
background-color: rgb(49,54,59);
15+
QWidget {
16+
color: white;
1717
}
1818

1919
/* HLine */
@@ -26,21 +26,23 @@ QFrame[frameShape="5"] {
2626
border-left: 0.065em solid rgb(67, 74, 80);
2727
}
2828

29-
QToolButton {
29+
QToolBar#toolbar QToolButton {
3030
color: white;
3131
background-color: rgb(49,54,59);
32+
border: none;
33+
border-radius: 0;
3234
}
3335

34-
QToolButton:hover {
36+
QToolBar#toolbar QToolButton:hover {
3537
color:white;
3638
background-color: rgb(65,0,127);
3739
}
3840

39-
QToolButton:checked {
41+
QToolBar#toolbar QToolButton:checked {
4042
background-color: rgb(64,68,82);
4143
}
4244

43-
QToolButton:checked:hover {
45+
QToolBar#toolbar QToolButton:checked:hover {
4446
background-color: rgb(65,0,127);
4547
}
4648

@@ -196,74 +198,88 @@ QHeaderView::section:hover {
196198
color:white;
197199
}
198200

199-
QComboBox {
200-
background-color:rgb(35,38,41);
201-
color: white;
201+
QComboBox,
202+
QDateTimeEdit,
203+
QDoubleSpinBox,
204+
QLineEdit,
205+
QPlainTextEdit,
206+
QSpinBox,
207+
QTextEdit,
208+
QToolButton {
209+
background: rgb(24, 34, 44);
210+
border: 0.065em solid rgb(58, 70, 94);
211+
padding: 0.25em 0.5em;
212+
border-radius: 0.26em;
213+
color: rgb(195, 199, 201);
214+
selection-background-color: rgb(26, 145, 235);
202215
selection-color: white;
203-
selection-background-color: rgb(65, 0, 127);
204-
border: 0.065em solid rgb(20, 20, 20);
205-
padding: 0.065em 0em 0.065em 0.26em;
206216
}
207217

208-
QComboBox::drop-down {
218+
QComboBox:hover,
219+
QComboBox:focus,
220+
QDateTimeEdit:focus,
221+
QDoubleSpinBox:focus,
222+
QDoubleSpinBox::up-button:hover,
223+
QDoubleSpinBox::down-button:hover,
224+
QLineEdit:focus,
225+
QPlainTextEdit:focus,
226+
QSpinBox,
227+
QSpinBox::up-button:hover,
228+
QSpinBox::down-button:hover,
229+
QTextEdit:focus,
230+
QToolButton:hover,
231+
QToolButton:focus,
232+
QToolButton:selected {
233+
border-color: rgb(21, 126, 205);
234+
color: rgb(195, 199, 201);
235+
}
236+
237+
QComboBox:disabled,
238+
QDateTimeEdit:disabled,
239+
QDoubleSpinBox:disabled,
240+
QLineEdit:disabled,
241+
QPlainTextEdit:disabled,
242+
QSpinBox:disabled,
243+
QPlainTextEdit:disabled,
244+
QToolButton:disabled {
245+
background-color: rgb(42, 54, 65);
246+
color: rgb(174, 180, 182);
247+
}
248+
249+
QComboBox::drop-down,
250+
QDateTimeEdit::drop-down {
209251
background-color: transparent;
210252
border: none;
211253
}
212254

213-
QComboBox::down-arrow {
255+
QComboBox::down-arrow,
256+
QDateTimeEdit::down-arrow {
214257
image: url(:/icons/dark_chevron_down);
215258
}
216259

217-
QComboBox:hover,
218-
QComboBox:selected {
219-
border-color: rgb(120, 20, 255);
220-
}
221-
222-
QComboBox:selected {
223-
background-color: rgb(65, 0, 127);
224-
}
225-
226-
QComboBox:disabled {
227-
background-color: rgb(47, 52, 56);
228-
border-color: rgb(30, 40, 45);
229-
color: rgb(160, 160, 160);
230-
}
231-
232260
QComboBox QAbstractItemView {
233-
background-color:rgb(35,38,41);
234-
color: white;
261+
selection-background-color: rgb(26, 145, 235);
262+
selection-color: white;
235263
}
236264

237265
QAbstractItemView::item:selected {
238266
background-color:rgb(65,0,127);
239267
color: white;
240268
}
241269

242-
QAbstractItemView::item:checked {
243-
background-color:rgb(65,0,127);
244-
color: white;
245-
}
246-
247-
QLineEdit {
248-
background-color:rgb(35,38,41);
249-
color: white;
250-
selection-color: white;
251-
selection-background-color:rgb(65,0,127);
252-
}
253-
254-
QDateTimeEdit {
255-
background-color:rgb(35,38,41);
270+
QAbstractItemView::item:checked,
271+
QAbstractItemView::item:hover,
272+
QAbstractItemView::item:selected {
273+
background-color: rgb(33, 44, 58);
256274
color: white;
257275
}
258276

259277
QDateTimeEdit QAbstractItemView {
260278
background-color:rgb(49,54,59);
261-
color: white;
262279
}
263280

264281
QDateTimeEdit QAbstractItemView::item:checked {
265282
background-color:rgb(65,0,127);
266-
color: white;
267283
}
268284

269285
QDateTimeEdit QAbstractItemView::item:selected {
@@ -275,26 +291,31 @@ QDialog{
275291
background-color: rgb(49,54,59);
276292
}
277293

278-
QWidget{
279-
color: white;
294+
QPushButton {
295+
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgb(44, 160, 247), stop: 1 rgb(26, 145, 235));
296+
border: 0.065em solid rgb(23, 137, 223);
297+
border-radius: 0.26em;
298+
padding: 0.2em 1.25em;
299+
color: rgb(225, 241, 253);
280300
}
281301

282-
QPushButton{
283-
background-color: rgb(64,68,82);
302+
QPushButton:hover,
303+
QPushButton:focus {
304+
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgb(63, 169, 248), stop: 1 rgb(26, 145, 235));
305+
border-color: rgb(21, 126, 205);
306+
color: rgb(255, 255, 255);
284307
}
285308

286-
QPushButton:selected{
287-
background-color: rgb(65,0,127);
288-
color: white;
289-
}
290-
291-
QPushButton:hover{
292-
background-color: rgb(65,0,127);
293-
color: white;
309+
QPushButton:pressed {
310+
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgb(26, 145, 235), stop: 1 rgb(44, 160, 247));
311+
border-color: rgb(21, 126, 205);
312+
color: rgb(207, 233, 252);
294313
}
295314

296315
QPushButton:disabled {
297-
color: rgb(160, 160, 160);
316+
background: rgb(68, 109, 139);
317+
border-color: rgb(38, 124, 188);
318+
color: rgb(211, 232, 248);
298319
}
299320

300321
QTreeWidget{
@@ -323,8 +344,44 @@ QListView::item:checked {
323344
color:white;
324345
}
325346

326-
QDoubleSpinBox{
327-
background-color: rgb(35,38,41);
347+
QToolButton {
348+
padding: 0.25em;
349+
}
350+
351+
QDateEdit::up-button,
352+
QDateEdit::down-button,
353+
QDoubleSpinBox::up-button,
354+
QDoubleSpinBox::down-button,
355+
QSpinBox::up-button,
356+
QSpinBox::down-button {
357+
width: 1.5em;
358+
height: 0.915em;
359+
border-image: none;
360+
border-left: 0.065em solid rgb(58, 70, 94);
361+
}
362+
363+
QDateEdit::up-button,
364+
QDoubleSpinBox::up-button,
365+
QSpinBox::up-button {
366+
background: transparent;
367+
}
368+
369+
QDateEdit::down-button,
370+
QDoubleSpinBox::down-button,
371+
QSpinBox::down-button {
372+
border-bottom-right-radius: 0.26em;
373+
}
374+
375+
QDateEdit::up-arrow,
376+
QDoubleSpinBox::up-arrow,
377+
QSpinBox::up-arrow {
378+
image: url(:/icons/light_chevron_up);
379+
}
380+
381+
QDateEdit::down-arrow,
382+
QDoubleSpinBox::down-arrow,
383+
QSpinBox::down-arrow {
384+
image: url(:/icons/light_chevron_down);
328385
}
329386

330387
QTabWidget::tab-bar {
@@ -365,20 +422,12 @@ QTabBar::tab:!selected:hover {
365422
background-color: rgb(58, 64, 69);
366423
}
367424

368-
QTextEdit {
369-
background-color: rgb(35,38,41);
370-
}
371-
372425
/* RPC Console */
373426
#messagesWidget, #lineEdit, #scraper_log {
374427
font-family: "Inconsolata";
375428
font-size: 10pt;
376429
}
377430

378-
QPlainTextEdit{
379-
background-color: rgb(35,38,41);
380-
}
381-
382431
QGroupBox{
383432
background-color: rgb(49,54,59);
384433
}
@@ -388,16 +437,6 @@ QListWidget{
388437
background-color:rgb(49,54,59);
389438
}
390439

391-
QRadioButton{
392-
color: white;
393-
background-color:rgb(49,54,59);
394-
}
395-
396-
QCheckBox{
397-
color: white;
398-
background-color:rgb(49,54,59);
399-
}
400-
401440
/* Main Window*/
402441

403442
#toolbar {

0 commit comments

Comments
 (0)