From 8efefc2a729b96de86aaa727f458856786860151 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 26 Sep 2015 20:37:48 +0200 Subject: [PATCH] unified dialog style sheet, removed hard coded colors --- gui/adddownloaddialog.cpp | 12 +++++------- gui/setrangedialog.cpp | 5 ++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gui/adddownloaddialog.cpp b/gui/adddownloaddialog.cpp index 0405bb9..ba7ce47 100644 --- a/gui/adddownloaddialog.cpp +++ b/gui/adddownloaddialog.cpp @@ -11,11 +11,14 @@ #include "gui/ui_adddownloaddialog.h" +#include + #include #include #include #include +using namespace Dialogs; using namespace Network; namespace QtGui { @@ -41,13 +44,8 @@ AddDownloadDialog::AddDownloadDialog(QWidget *parent) : m_selectDownloadTypeInputDialog(nullptr) { m_ui->setupUi(this); - -#ifdef Q_OS_WIN32 - setStyleSheet(QStringLiteral("#mainWidget { color: black; background-color: white; border: none; } #bottomWidget { background-color: #F0F0F0; border-top: 1px solid #DFDFDF; } QMessageBox QLabel, QInputDialog QLabel, #mainInstructionLabel { font-size: 12pt; color: #003399; }")); -#else - setStyleSheet(QStringLiteral("#mainInstructionLabel { font-weight: bold; }")); -#endif - + makeHeading(m_ui->mainInstructionLabel); + setStyleSheet(dialogStyle()); connect(m_ui->backPushButton, &QPushButton::clicked, this, &AddDownloadDialog::back); connect(m_ui->addPushButton, &QPushButton::clicked, this, &AddDownloadDialog::setLastUrl); connect(m_ui->addPushButton, &QPushButton::clicked, this, &AddDownloadDialog::addDownloadClicked); diff --git a/gui/setrangedialog.cpp b/gui/setrangedialog.cpp index 4665e4b..cc6493c 100644 --- a/gui/setrangedialog.cpp +++ b/gui/setrangedialog.cpp @@ -4,8 +4,11 @@ #include "gui/ui_setrangedialog.h" +#include + #include +using namespace Dialogs; using namespace Network; namespace QtGui { @@ -17,7 +20,7 @@ SetRangeDialog::SetRangeDialog(DownloadRange &range, QWidget *parent) : { m_ui->setupUi(this); #ifdef Q_OS_WIN32 - setStyleSheet(QStringLiteral("#mainWidget { color: black; background-color: white; border: none; } #bottomWidget { background-color: #F0F0F0; border-top: 1px solid #DFDFDF; } QMessageBox QLabel, QInputDialog QLabel { font-size: 12pt; color: #003399; }")); + setStyleSheet(dialogStyle()); #endif m_ui->fromSpinBox->setValue(range.startOffset()); m_ui->toSpinBox->setValue(range.endOffset());