unified dialog style sheet, removed hard coded colors

This commit is contained in:
Martchus 2015-09-26 20:37:16 +02:00
parent ffa0d45397
commit 624d2e7a37
3 changed files with 10 additions and 8 deletions

View File

@ -10,11 +10,13 @@
#include <tagparser/matroska/matroskaeditionentry.h>
#include <qtutilities/models/checklistmodel.h>
#include <qtutilities/misc/dialogutils.h>
#include <QMessageBox>
using namespace std;
using namespace Models;
using namespace Dialogs;
using namespace Media;
namespace QtGui {
@ -68,9 +70,7 @@ EnterTargetDialog::EnterTargetDialog(QWidget *parent) :
m_ui->setupUi(this);
// apply style sheets
#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, #instructionLabel {font-size: 12pt; color: #003399; }"));
#else
setStyleSheet(QStringLiteral("#instructionLabel { font-weight: bold; }"));
setStyleSheet(dialogStyle());
#endif
// setup views
m_ui->tracksListView->setModel(m_tracksModel);

View File

@ -95,6 +95,7 @@ MainWindow::MainWindow(QWidget *parent) :
{
// setup UI
m_ui->setupUi(this);
makeHeading(m_ui->fileNameLabel);
#ifdef TAGEDITOR_USE_WEBENGINE
m_infoWebView = new QWebEngineView(m_ui->tagSplitter);
#else
@ -106,9 +107,9 @@ MainWindow::MainWindow(QWidget *parent) :
connect(m_infoWebView, &QWidget::customContextMenuRequested, this, &MainWindow::showInfoWebViewContextMenu);
m_ui->tagSplitter->addWidget(m_infoWebView);
#ifdef Q_OS_WIN32
setStyleSheet(QStringLiteral("#fileNameLabel, #optionsLabel { font-size: 12pt; color: #003399; } #rightWidget, #rightWidget QSplitter::handle { background-color: white; }"));
setStyleSheet(dialogStyle() + QStringLiteral("#rightWidget, #rightWidget QSplitter::handle { color: palette(text); background-color: palette(base); }"));
#else
setStyleSheet(QStringLiteral("#fileNameLabel, #optionsLabel { font-weight: bold; } "));
setStyleSheet(dialogStyle());
#endif
// restore geometry and state
restoreGeometry(Settings::mainWindowGeometry());

View File

@ -8,6 +8,8 @@
#include "gui/ui_renamefilesdialog.h"
#include <qtutilities/misc/dialogutils.h>
#include <QMessageBox>
#include <QFileDialog>
#include <QDir>
@ -19,6 +21,7 @@
#include <thread>
using namespace Dialogs;
using namespace RenamingUtility;
namespace QtGui {
@ -37,11 +40,9 @@ RenameFilesDialog::RenameFilesDialog(QWidget *parent) :
{
setAttribute(Qt::WA_QuitOnClose, false);
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; } QSplitter:handle { background-color: white; }"));
setStyleSheet(dialogStyle() + QStringLiteral("QSplitter:handle { background-color: palette(base); }"));
#endif
// setup javascript editor and script file selection
QFont font("Courier", 10);
font.setFixedPitch(true);