From 5d6688b8fc60861b20eba166c47e8f94105574cf Mon Sep 17 00:00:00 2001 From: Charles <18726788+csharpee@users.noreply.github.com> Date: Thu, 23 Apr 2020 03:49:44 -0400 Subject: [PATCH 1/6] created new SD theme called Midnight Qt --- application.qrc | 1 + res/css/midnight.css | 105 +++++++++++++++++++++++++++++++++++++++++++ src/connection.cpp | 2 +- 3 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 res/css/midnight.css diff --git a/application.qrc b/application.qrc index 3d42593..298a692 100644 --- a/application.qrc +++ b/application.qrc @@ -39,6 +39,7 @@ res/css/dark.css res/css/default.css res/css/light.css + res/css/midnight.css res/images/blue/unchecked.png diff --git a/res/css/midnight.css b/res/css/midnight.css new file mode 100644 index 0000000..2b95bcd --- /dev/null +++ b/res/css/midnight.css @@ -0,0 +1,105 @@ +/* +Theme: Midnight Qt +Version: 1.0.0 + +Author: Charles Sharpe +Date: Apr. 23, 2020 +Website: https://www.csharpe.me +License: MIT license: http://opensource.org/licenses/MIT +*/ + +QWidget, QMainWindow, QMenuBar, QMenu, QDialog, QTabWidget, QTableView, QTableView::item, QScrollArea, QGroupBox, QPlainTextEdit, QLineEdit, QLabel, MainWindow +{ +background-color: #111; +color: #fff; +} + +QTabWidget QTabBar::tab { +min-height: 25px; +padding: 15px 30px; /* TopBottom LeftRight */ +border: 1px solid #222; +background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #333, stop: 1 #111); +} + +QTabWidget QTabBar::tab:selected { +background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #555, stop: 1 #111); +color:#fff; +border: 1px ridge #000; +} + +QTabWidget QTabBar::tab:hover { +background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #555, stop: 1 #111); +} + +QHeaderView { /* Table Header */ +background-color:#111; +} + +QHeaderView::section { /* Table Header Sections */ +qproperty-alignment:center; +background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #333, stop: 1 #111); +color:#fff; +min-height:25px; +font-weight:bold; +font-size:11px; +outline:0; +border:1px solid #222; +padding: 2px 5px; /* TopBottom LeftRight */ +} + +QHeaderView::section:last { +border-right: 0px solid #222; +} + +QScrollArea { +background:transparent; +border:0px; +} + +QTableView { /* Table - has to be selected as a class otherwise it throws off QCalendarWidget */ +background:#111; +} + +QTableView::item { /* Table Item */ +background-color:#111; +border:1px solid #222; +font-size:12px; +} + +QTableView::item:selected { /* Table Item Selected */ +background-color:#fff; +color:#000; +} + +QMenuBar { +background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #222, stop: 1 #111); +color: #fff; +} + +QMenuBar::item { +background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #222, stop: 1 #111); +color: #fff; +padding: 5px 7px; +margin: 0px; +} + +QMenuBar::item:selected { +background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #333, stop: 1 #111); +} + +QMenu { +border:1px solid #222; +} + +QMenu::item { +padding: 7px 15px; +} + +QMenu::item:selected { +background: #222; +} + +QMenu::separator { + height: 2px; + background: #222; +} diff --git a/src/connection.cpp b/src/connection.cpp index 7eb7d0f..72a1446 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -23,7 +23,7 @@ ConnectionLoader::ConnectionLoader(MainWindow* main, RPC* rpc) { QMovie *movie2 = new QMovie(":/img/res/silentdragon-animated-startup-dark.gif");; auto theme = Settings::getInstance()->get_theme_name(); auto size = QSize(512,512); - if (theme == "dark") { + if (theme == "dark" || "midnight") { movie2->setScaledSize(size); connD->topIcon->setMovie(movie2); movie2->start(); From a7617f97cae2e822034a9ddff3b57e9b1321a662 Mon Sep 17 00:00:00 2001 From: Charles <18726788+csharpee@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:10:33 -0400 Subject: [PATCH 2/6] Updated some details like radiobuttons --- res/css/midnight.css | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/res/css/midnight.css b/res/css/midnight.css index 2b95bcd..38d6109 100644 --- a/res/css/midnight.css +++ b/res/css/midnight.css @@ -1,11 +1,12 @@ /* Theme: Midnight Qt -Version: 1.0.0 +Version: 1.0.1 +Reference: https://doc.qt.io/qt-5/stylesheet-reference.html Author: Charles Sharpe Date: Apr. 23, 2020 Website: https://www.csharpe.me -License: MIT license: http://opensource.org/licenses/MIT +License: http://opensource.org/licenses/MIT */ QWidget, QMainWindow, QMenuBar, QMenu, QDialog, QTabWidget, QTableView, QTableView::item, QScrollArea, QGroupBox, QPlainTextEdit, QLineEdit, QLabel, MainWindow @@ -14,9 +15,39 @@ background-color: #111; color: #fff; } +QPushButton { +padding: 10px; +} + +QPushButton:hover { +background: #222; +} + +QLineEdit, QRadioButton::indicator::unchecked, QCheckBox::indicator::unchecked { +background: #333; +border: 1px solid #000; +border-radius: 3px; +} + +QLineEdit { +font-size: 12px; +} + +QLineEdit:focus { +border: 1px solid #9d8400; +} + +QWidget QLabel { +font-size: 11pt; +} + +QWidget QCheckBox { +font-weight: bold; +} + QTabWidget QTabBar::tab { -min-height: 25px; -padding: 15px 30px; /* TopBottom LeftRight */ +min-height: 15px; +padding: 15px 25px; /* TopBottom LeftRight */ border: 1px solid #222; background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #333, stop: 1 #111); } From cd3904ee1447506f81379ab3d9cbd177703c2900 Mon Sep 17 00:00:00 2001 From: Charles <18726788+csharpee@users.noreply.github.com> Date: Thu, 23 Apr 2020 17:47:08 -0400 Subject: [PATCH 3/6] blended QTabs --- res/css/midnight.css | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/res/css/midnight.css b/res/css/midnight.css index 38d6109..8a275f7 100644 --- a/res/css/midnight.css +++ b/res/css/midnight.css @@ -6,7 +6,7 @@ Reference: https://doc.qt.io/qt-5/stylesheet-reference.html Author: Charles Sharpe Date: Apr. 23, 2020 Website: https://www.csharpe.me -License: http://opensource.org/licenses/MIT +License: https://opensource.org/licenses/MIT */ QWidget, QMainWindow, QMenuBar, QMenu, QDialog, QTabWidget, QTableView, QTableView::item, QScrollArea, QGroupBox, QPlainTextEdit, QLineEdit, QLabel, MainWindow @@ -48,14 +48,16 @@ font-weight: bold; QTabWidget QTabBar::tab { min-height: 15px; padding: 15px 25px; /* TopBottom LeftRight */ -border: 1px solid #222; +border: 1px ridge #222; +left: 1px; /* Fix 1px alignment */ background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #333, stop: 1 #111); } QTabWidget QTabBar::tab:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #555, stop: 1 #111); color:#fff; -border: 1px ridge #000; +border: 1px ridge #222; +border-bottom: 0px; /* Overwrites border-bottom */ } QTabWidget QTabBar::tab:hover { @@ -72,14 +74,14 @@ background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #333, st color:#fff; min-height:25px; font-weight:bold; -font-size:11px; +font-size:12px; outline:0; -border:1px solid #222; +border:1px ridge #222; padding: 2px 5px; /* TopBottom LeftRight */ } QHeaderView::section:last { -border-right: 0px solid #222; +border-right: 0px ridge #222; } QScrollArea { From 44e2ef01c937f85f01869e78bccd05298b72fffa Mon Sep 17 00:00:00 2001 From: CharlesS <18726788-csharpee@users.noreply.github.com> Date: Thu, 23 Apr 2020 21:55:58 -0400 Subject: [PATCH 4/6] added midnight to settings.ui --- src/settings.ui | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/settings.ui b/src/settings.ui index 6665917..ec5dae4 100644 --- a/src/settings.ui +++ b/src/settings.ui @@ -26,7 +26,7 @@ - 3 + 1 @@ -430,6 +430,11 @@ dark + + + midnight + + From 61ba05199f047f5bc5748fba81670ac926389567 Mon Sep 17 00:00:00 2001 From: Charles <18726788+csharpee@users.noreply.github.com> Date: Fri, 24 Apr 2020 15:48:51 -0400 Subject: [PATCH 5/6] fine tuning of qmenu, QLineEdit,QPushButton --- res/css/midnight.css | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/res/css/midnight.css b/res/css/midnight.css index 8a275f7..39347c1 100644 --- a/res/css/midnight.css +++ b/res/css/midnight.css @@ -1,6 +1,6 @@ /* Theme: Midnight Qt -Version: 1.0.1 +Version: 1.0.2 Reference: https://doc.qt.io/qt-5/stylesheet-reference.html Author: Charles Sharpe @@ -16,7 +16,7 @@ color: #fff; } QPushButton { -padding: 10px; +padding: 10px 15px; } QPushButton:hover { @@ -24,8 +24,8 @@ background: #222; } QLineEdit, QRadioButton::indicator::unchecked, QCheckBox::indicator::unchecked { -background: #333; -border: 1px solid #000; +background: #222; +border: 1px solid #333; border-radius: 3px; } @@ -47,7 +47,7 @@ font-weight: bold; QTabWidget QTabBar::tab { min-height: 15px; -padding: 15px 25px; /* TopBottom LeftRight */ +padding: 15px 25px; border: 1px ridge #222; left: 1px; /* Fix 1px alignment */ background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #333, stop: 1 #111); @@ -77,7 +77,7 @@ font-weight:bold; font-size:12px; outline:0; border:1px ridge #222; -padding: 2px 5px; /* TopBottom LeftRight */ +padding: 2px 5px; } QHeaderView::section:last { @@ -133,6 +133,7 @@ background: #222; } QMenu::separator { - height: 2px; + height: 1px; + margin: 3px 7px 3px 7px; /* space at ends of separator */ background: #222; } From 686622e5fa9e437d5157d367e03ccbbbd36e12d1 Mon Sep 17 00:00:00 2001 From: Charles <18726788+csharpee@users.noreply.github.com> Date: Fri, 24 Apr 2020 16:35:07 -0400 Subject: [PATCH 6/6] fixes with sendtab.cpp, settings.ui, rpc.cpp --- src/rpc.cpp | 2 +- src/sendtab.cpp | 2 +- src/settings.ui | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc.cpp b/src/rpc.cpp index 2519964..a47f592 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -1222,7 +1222,7 @@ void RPC::shutdownZcashd() { QMovie *movie1 = new QMovie(":/img/res/silentdragon-animated.gif");; QMovie *movie2 = new QMovie(":/img/res/silentdragon-animated-dark.gif");; auto theme = Settings::getInstance()->get_theme_name(); - if (theme == "dark") { + if (theme == "dark" || "midnight") { movie2->setScaledSize(QSize(512,512)); connD.topIcon->setMovie(movie2); movie2->start(); diff --git a/src/sendtab.cpp b/src/sendtab.cpp index 4b0b325..3a9ce81 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -715,7 +715,7 @@ void MainWindow::sendButton() { QMovie *movie1 = new QMovie(":/img/res/silentdragon-animated.gif");; QMovie *movie2 = new QMovie(":/img/res/silentdragon-animated-dark.gif");; auto theme = Settings::getInstance()->get_theme_name(); - if (theme == "dark") { + if (theme == "dark" || "midnight") { movie2->setScaledSize(QSize(512,512)); connD->topIcon->setMovie(movie2); movie2->start(); diff --git a/src/settings.ui b/src/settings.ui index ec5dae4..16a6de8 100644 --- a/src/settings.ui +++ b/src/settings.ui @@ -26,7 +26,7 @@ - 1 + 3