Skip to content

Commit 43e9655

Browse files
authored
Merge pull request #2170 from cyrossignol/gui
gui: Refresh checkbox and radio button styles
2 parents 006aa49 + 6d09495 commit 43e9655

8 files changed

+127
-0
lines changed

src/Makefile.qt.include

+4
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ RES_ICONS = \
396396
qt/res/icons/clock3.png \
397397
qt/res/icons/clock4.png \
398398
qt/res/icons/clock5.png \
399+
qt/res/icons/checkbox_checked.svg \
400+
qt/res/icons/checkbox_indeterminate.svg \
401+
qt/res/icons/checkbox_unchecked.svg \
399402
qt/res/icons/configure.png \
400403
qt/res/icons/connect0.svg \
401404
qt/res/icons/connect1.svg \
@@ -423,6 +426,7 @@ RES_ICONS = \
423426
qt/res/icons/open_link.svg \
424427
qt/res/icons/qrcode.png \
425428
qt/res/icons/quit.png \
429+
qt/res/icons/radio_checked.svg \
426430
qt/res/icons/remove.png \
427431
qt/res/icons/round_gray_x.svg \
428432
qt/res/icons/round_green_check.svg \

src/qt/bitcoin.qrc

+4
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@
201201
<file alias="light_mode_active">res/icons/light_mode_active.svg</file>
202202
<file alias="no_result">res/icons/no_result.svg</file>
203203
<file alias="open_link">res/icons/open_link.svg</file>
204+
<file alias="checkbox_checked">res/icons/checkbox_checked.svg</file>
205+
<file alias="checkbox_indeterminate">res/icons/checkbox_indeterminate.svg</file>
206+
<file alias="checkbox_unchecked">res/icons/checkbox_unchecked.svg</file>
207+
<file alias="radio_checked">res/icons/radio_checked.svg</file>
204208

205209
</qresource>
206210
<qresource prefix="/images">

src/qt/res/icons/checkbox_checked.svg

+1
Loading
Loading
+1
Loading

src/qt/res/icons/radio_checked.svg

+2
Loading

src/qt/res/stylesheets/dark_stylesheet.qss

+57
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,63 @@ QSpinBox::down-arrow {
438438
image: url(:/icons/dark_chevron_down);
439439
}
440440

441+
QCheckBox::indicator,
442+
QRadioButton::indicator,
443+
QTreeView::indicator {
444+
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgb(234, 237, 237), stop: 1 rgb(202, 210, 210));
445+
border: 0.13em solid rgb(170, 182, 182);
446+
border-radius: 0.26em;
447+
}
448+
449+
QCheckBox::indicator,
450+
QRadioButton::indicator {
451+
width: 0.8em;
452+
height: 0.8em;
453+
}
454+
455+
QRadioButton::indicator {
456+
border-radius: 0.5em;
457+
}
458+
459+
QCheckBox::indicator:unchecked,
460+
QRadioButton::indicator:unchecked,
461+
QTreeView::indicator:unchecked {
462+
image: url(:/icons/checkbox_unchecked);
463+
}
464+
465+
QCheckBox::indicator:unchecked:hover,
466+
QRadioButton::indicator:unchecked:hover,
467+
QTreeView::indicator:unchecked:hover {
468+
border-color: rgb(33, 114, 208);
469+
}
470+
471+
QCheckBox::indicator:checked,
472+
QCheckBox::indicator:indeterminate,
473+
QRadioButton::indicator:checked,
474+
QTreeView::indicator:checked,
475+
QTreeView::indicator:indeterminate {
476+
background: rgb(74, 144, 226);
477+
border-color: rgb(74, 144, 226);
478+
image: url(:/icons/checkbox_checked);
479+
}
480+
481+
QCheckBox::indicator:indeterminate,
482+
QTreeView::indicator:indeterminate {
483+
image: url(:/icons/checkbox_indeterminate);
484+
}
485+
486+
QCheckBox::indicator:checked:hover,
487+
QCheckBox::indicator:indeterminate:hover,
488+
QTreeView::indicator:checked:hover,
489+
QTreeView::indicator:indeterminate:hover {
490+
background: rgb(33, 114, 208);
491+
border-color: rgb(33, 114, 208);
492+
}
493+
494+
QRadioButton::indicator::checked {
495+
image: url(:/icons/radio_checked);
496+
}
497+
441498
QTabWidget::tab-bar {
442499
left: 0.5em;
443500
}

src/qt/res/stylesheets/light_stylesheet.qss

+57
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,63 @@ QSpinBox::down-arrow {
429429
image: url(:/icons/light_chevron_down);
430430
}
431431

432+
QCheckBox::indicator,
433+
QRadioButton::indicator,
434+
QTreeView::indicator {
435+
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 white, stop: 1 rgb(234, 237, 237));
436+
border: 0.13em solid rgb(191, 199, 215);
437+
border-radius: 0.26em;
438+
}
439+
440+
QCheckBox::indicator,
441+
QRadioButton::indicator {
442+
width: 0.8em;
443+
height: 0.8em;
444+
}
445+
446+
QRadioButton::indicator {
447+
border-radius: 0.5em;
448+
}
449+
450+
QCheckBox::indicator:unchecked,
451+
QRadioButton::indicator:unchecked,
452+
QTreeView::indicator:unchecked {
453+
image: url(:/icons/checkbox_unchecked);
454+
}
455+
456+
QCheckBox::indicator:unchecked:hover,
457+
QRadioButton::indicator:unchecked:hover,
458+
QTreeView::indicator:unchecked:hover {
459+
border-color: rgb(144, 19, 254);
460+
}
461+
462+
QCheckBox::indicator:checked,
463+
QCheckBox::indicator:indeterminate,
464+
QRadioButton::indicator:checked,
465+
QTreeView::indicator:checked,
466+
QTreeView::indicator:indeterminate {
467+
background: rgb(172, 78, 254);
468+
border-color: rgb(172, 78, 254);
469+
image: url(:/icons/checkbox_checked);
470+
}
471+
472+
QCheckBox::indicator:indeterminate,
473+
QTreeView::indicator:indeterminate {
474+
image: url(:/icons/checkbox_indeterminate);
475+
}
476+
477+
QCheckBox::indicator:checked:hover,
478+
QCheckBox::indicator:indeterminate:hover,
479+
QTreeView::indicator:checked:hover,
480+
QTreeView::indicator:indeterminate:hover {
481+
background: rgb(144, 19, 254);
482+
border-color: rgb(144, 19, 254);
483+
}
484+
485+
QRadioButton::indicator::checked {
486+
image: url(:/icons/radio_checked);
487+
}
488+
432489
QTabWidget::tab-bar {
433490
left: 0.5em;
434491
}

0 commit comments

Comments
 (0)