From 02d16b6a12e38bbf08c6d048feb4a6b781185493 Mon Sep 17 00:00:00 2001 From: garak Date: Wed, 21 Aug 2019 15:30:44 -0400 Subject: [PATCH] revamp dark theme colors, add new themes new themes: - midnight (the old dark theme) - emerald green - pink and blue --- resources/themes.qrc | 3 + resources/themes/dark.qss | 127 ++++++++++++++++----- resources/themes/emerald-green.qss | 169 ++++++++++++++++++++++++++++ resources/themes/midnight.qss | 169 ++++++++++++++++++++++++++++ resources/themes/pink-and-blue.qss | 170 +++++++++++++++++++++++++++++ src/mainwindow.cpp | 2 +- 6 files changed, 613 insertions(+), 27 deletions(-) create mode 100644 resources/themes/emerald-green.qss create mode 100644 resources/themes/midnight.qss create mode 100644 resources/themes/pink-and-blue.qss diff --git a/resources/themes.qrc b/resources/themes.qrc index 4c2d8878..547d7e03 100644 --- a/resources/themes.qrc +++ b/resources/themes.qrc @@ -2,5 +2,8 @@ themes/dark.qss themes/light.qss + themes/midnight.qss + themes/pink-and-blue.qss + themes/emerald-green.qss diff --git a/resources/themes/dark.qss b/resources/themes/dark.qss index 70965acd..17154c40 100644 --- a/resources/themes/dark.qss +++ b/resources/themes/dark.qss @@ -1,53 +1,68 @@ /* DARK theme for porymap */ +/* + + Background #232629 + Font #EFF0F1 + Highlight #18465D + Accent #19232D + Disabled #505F69 + +*/ + /* General Widgets */ QWidget { - background: #31332b; - color: #F8F8F2; + background: #19232D; + color: #EFF0F1; +} + +QWidget::disabled { + background: #19232D; + color: #787878; } QWidget::item:selected { - background: #49483E; + background: #18465D; } QWidget::item:focus { - background: #49483E; + background: #18465D; border: none; } /* Combo Boxes */ QComboBox { - background: #272822; - color: #F8F8F2; + background: #19232D; + color: #EFF0F1; } QComboBox QAbstractItemView { - background: #31332b; - color: #75715E; - selection-background-color: #49483E; + background: #232629; + color: #505F69; + selection-background-color: #18465D; } /* Spin Boxes */ QSpinBox { - background: #272822; - color: #F8F8F2; + background: #19232D; + color: #EFF0F1; } /* Line Edits */ QLineEdit { - background: #272822; - color: #F8F8F2; + background: #19232D; + color: #EFF0F1; } /* Frames, Labels */ #label_spritePixmap { - background: #272822; - color: #F8F8F2; + background: #19232D; + color: #EFF0F1; } /* Checkboxes */ @@ -57,39 +72,99 @@ QCheckBox, QRadioButton { } QRadioButton::indicator::unchecked, QCheckBox::indicator::unchecked { - border: 1px solid #49483E; + border: 1px solid #18465D; background: none; } QRadioButton::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover { - border: 1px solid #F8F8F2; + border: 1px solid #EFF0F1; } QRadioButton::indicator::checked, QCheckBox::indicator::checked { - border: 1px solid #49483E; - background: #49483E; + border: 1px solid #18465D; + background: #18465D; } QRadioButton::indicator:checked:hover, QCheckBox::indicator:checked:hover { - border: 1px solid #F8F8F2; - background: #F8F8F2; + border: 1px solid #EFF0F1; + background: #EFF0F1; } /* Map List View */ QTreeView { - background: #272822; + background: #19232D; } QTreeView::item:hover { - background: #49483E; + background: #18465D; } QTreeView::item:selected { - background: #49483E; - color: #F8F8F2; + background: #18465D; + color: #EFF0F1; } QTreeView::branch { - background: #272822; + background: #19232D; +} + +/* Scroll Bar */ + +QScrollBar::vertical { + background-color: #19232D; +} + +QScrollBar::horizontal { + background-color: #19232D; +} + +QScrollBar::handle:horizontal { + background-color: #787878; + border: 1px solid #232629; +} + +QScrollBar::handle:vertical { + background-color: #787878; + border: 1px solid #232629; +} + +QScrollBar::add-line:horizontal { + border: none; + background: none; + color: none; +} + +QScrollBar::add-line:vertical { + border: none; + background: none; + color: none; +} + +QScrollBar::sub-line:horizontal { + border: none; + background: none; + color: none; +} + +QScrollBar::sub-line:vertical { + border: none; + background: none; + color: none; +} + +QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal { + background: none; +} + +QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical { + background: none; +} + +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { + background: none; +} + +QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { + background: none; } diff --git a/resources/themes/emerald-green.qss b/resources/themes/emerald-green.qss new file mode 100644 index 00000000..ad061ad2 --- /dev/null +++ b/resources/themes/emerald-green.qss @@ -0,0 +1,169 @@ +/* EMERALD GREEN theme for porymap */ + +/* + + Background #2d8f4e + Font #B9E9C9 + Highlight #50C878 + Accent #226C3B + +*/ + +/* General Widgets */ + +QWidget { + background: #2d8f4e; + color: #B9E9C9; +} + +QWidget::disabled { + background: #2d8f4e; + color: #AAAAAA; +} + +QWidget::item:selected { + background: #50C878; +} + +QWidget::item:focus { + background: #50C878; + border: none; +} + +/* Combo Boxes */ + +QComboBox { + background: #226C3B; + color: #B9E9C9; +} + +QComboBox QAbstractItemView { + background: #2d8f4e; + color: #B9E9C9; + selection-background-color: #50C878; +} + +/* Spin Boxes */ + +QSpinBox { + background: #226C3B; + color: #B9E9C9; +} + +/* Line Edits */ + +QLineEdit { + background: #226C3B; + color: #B9E9C9; +} + +/* Frames, Labels */ + +#label_spritePixmap { + background: #226C3B; + color: #B9E9C9; +} + +/* Checkboxes */ + +QCheckBox, QRadioButton { + border: none; +} + +QRadioButton::indicator::unchecked, QCheckBox::indicator::unchecked { + border: 1px solid #50C878; + background: none; +} + +QRadioButton::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover { + border: 1px solid #B9E9C9; +} + +QRadioButton::indicator::checked, QCheckBox::indicator::checked { + border: 1px solid #50C878; + background: #50C878; +} + +QRadioButton::indicator:checked:hover, QCheckBox::indicator:checked:hover { + border: 1px solid #B9E9C9; + background: #B9E9C9; +} + +/* Map List View */ + +QTreeView { + background: #226C3B; +} + +QTreeView::item:hover { + background: #50C878; +} + +QTreeView::item:selected { + background: #50C878; + color: #B9E9C9; +} + +QTreeView::branch { + background: #226C3B; +} + +/* Scroll Bar */ + +QScrollBar::vertical { + background-color: #2d8f4e; +} + +QScrollBar::horizontal { + background-color: #2d8f4e; +} + +QScrollBar::handle:horizontal { + background-color: #226C3B; + border: 1px solid #2d8f4e; +} + +QScrollBar::handle:vertical { + background-color: #226C3B; + border: 1px solid #2d8f4e; +} + +QScrollBar::add-line:horizontal { + border: none; + background: none; + color: none; +} + +QScrollBar::add-line:vertical { + border: none; + background: none; + color: none; +} + +QScrollBar::sub-line:horizontal { + border: none; + background: none; + color: none; +} + +QScrollBar::sub-line:vertical { + border: none; + background: none; + color: none; +} + +QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal { + background: none; +} + +QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical { + background: none; +} + +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { + background: none; +} + +QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { + background: none; +} diff --git a/resources/themes/midnight.qss b/resources/themes/midnight.qss new file mode 100644 index 00000000..8552ba4c --- /dev/null +++ b/resources/themes/midnight.qss @@ -0,0 +1,169 @@ +/* MIDNIGHT theme for porymap */ + +/* + + Background #31332b + Font #F8F8F2 + Highlight #49483E + Accent #272822 + +*/ + +/* General Widgets */ + +QWidget { + background: #31332b; + color: #F8F8F2; +} + +QWidget::disabled { + background: #272822; + color: #75715E; +} + +QWidget::item:selected { + background: #49483E; +} + +QWidget::item:focus { + background: #49483E; + border: none; +} + +/* Combo Boxes */ + +QComboBox { + background: #272822; + color: #F8F8F2; +} + +QComboBox QAbstractItemView { + background: #31332b; + color: #75715E; + selection-background-color: #49483E; +} + +/* Spin Boxes */ + +QSpinBox { + background: #272822; + color: #F8F8F2; +} + +/* Line Edits */ + +QLineEdit { + background: #272822; + color: #F8F8F2; +} + +/* Frames, Labels */ + +#label_spritePixmap { + background: #272822; + color: #F8F8F2; +} + +/* Checkboxes */ + +QCheckBox, QRadioButton { + border: none; +} + +QRadioButton::indicator::unchecked, QCheckBox::indicator::unchecked { + border: 1px solid #49483E; + background: none; +} + +QRadioButton::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover { + border: 1px solid #F8F8F2; +} + +QRadioButton::indicator::checked, QCheckBox::indicator::checked { + border: 1px solid #49483E; + background: #49483E; +} + +QRadioButton::indicator:checked:hover, QCheckBox::indicator:checked:hover { + border: 1px solid #F8F8F2; + background: #F8F8F2; +} + +/* Map List View */ + +QTreeView { + background: #272822; +} + +QTreeView::item:hover { + background: #49483E; +} + +QTreeView::item:selected { + background: #49483E; + color: #F8F8F2; +} + +QTreeView::branch { + background: #272822; +} + +/* Scroll Bar */ + +QScrollBar::vertical { + background-color: #31332b; +} + +QScrollBar::horizontal { + background-color: #31332b; +} + +QScrollBar::handle:horizontal { + background-color: #272822; + border: 1px solid #31332b; +} + +QScrollBar::handle:vertical { + background-color: #272822; + border: 1px solid #31332b; +} + +QScrollBar::add-line:horizontal { + border: none; + background: none; + color: none; +} + +QScrollBar::add-line:vertical { + border: none; + background: none; + color: none; +} + +QScrollBar::sub-line:horizontal { + border: none; + background: none; + color: none; +} + +QScrollBar::sub-line:vertical { + border: none; + background: none; + color: none; +} + +QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal { + background: none; +} + +QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical { + background: none; +} + +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { + background: none; +} + +QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { + background: none; +} diff --git a/resources/themes/pink-and-blue.qss b/resources/themes/pink-and-blue.qss new file mode 100644 index 00000000..8a919266 --- /dev/null +++ b/resources/themes/pink-and-blue.qss @@ -0,0 +1,170 @@ +/* PINK AND BLUE theme for porymap */ + +/* + + Background #31739C + Font #FFFFFF + Highlight #EF5A63 + Accent #FF94B5 + Disabled #4A9CD6 + +*/ + +/* General Widgets */ + +QWidget { + background: #31739C; + color: #FFFFFF; +} + +QWidget::disabled { + background: #31739C; + color: #BBBBBB; +} + +QWidget::item:selected { + background: #FF94B5; +} + +QWidget::item:focus { + background: #FF94B5; + border: none; +} + +/* Combo Boxes */ + +QComboBox { + background: #EF5A63; + color: #FFFFFF; +} + +QComboBox QAbstractItemView { + background: #31739C; + color: #4A9CD6; + selection-background-color: #FF94B5; +} + +/* Spin Boxes */ + +QSpinBox { + background: #EF5A63; + color: #FFFFFF; +} + +/* Line Edits */ + +QLineEdit { + background: #EF5A63; + color: #FFFFFF; +} + +/* Frames, Labels */ + +#label_spritePixmap { + background: #EF5A63; + color: #FFFFFF; +} + +/* Checkboxes */ + +QCheckBox, QRadioButton { + border: none; +} + +QRadioButton::indicator::unchecked, QCheckBox::indicator::unchecked { + border: 1px solid #FF94B5; + background: none; +} + +QRadioButton::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover { + border: 1px solid #FFFFFF; +} + +QRadioButton::indicator::checked, QCheckBox::indicator::checked { + border: 1px solid #FF94B5; + background: #FF94B5; +} + +QRadioButton::indicator:checked:hover, QCheckBox::indicator:checked:hover { + border: 1px solid #FFFFFF; + background: #FFFFFF; +} + +/* Map List View */ + +QTreeView { + background: #EF5A63; +} + +QTreeView::item:hover { + background: #FF94B5; +} + +QTreeView::item:selected { + background: #FF94B5; + color: #FFFFFF; +} + +QTreeView::branch { + background: #EF5A63; +} + +/* Scroll Bar */ + +QScrollBar::vertical { + background-color: #EF5A63; +} + +QScrollBar::horizontal { + background-color: #EF5A63; +} + +QScrollBar::handle:horizontal { + background-color: #4A9CD6; + border: 1px solid #31739C; +} + +QScrollBar::handle:vertical { + background-color: #4A9CD6; + border: 1px solid #31739C; +} + +QScrollBar::add-line:horizontal { + border: none; + background: none; + color: none; +} + +QScrollBar::add-line:vertical { + border: none; + background: none; + color: none; +} + +QScrollBar::sub-line:horizontal { + border: none; + background: none; + color: none; +} + +QScrollBar::sub-line:vertical { + border: none; + background: none; + color: none; +} + +QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal { + background: none; +} + +QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical { + background: none; +} + +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { + background: none; +} + +QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { + background: none; +} diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3593075e..3d71e98a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2135,7 +2135,7 @@ void MainWindow::on_actionAbout_Porymap_triggered() void MainWindow::on_actionThemes_triggered() { QStringList themes; - QRegularExpression re(":/themes/([A-z0-9_]+).qss"); + QRegularExpression re(":/themes/([A-z0-9_-]+).qss"); themes.append("default"); QDirIterator it(":/themes", QDirIterator::Subdirectories); while (it.hasNext()) {