Permalink
Browse files

Merge pull request #6739 from spycrab/qt_aesthetics

Qt: Fix visual inconsistencies.
  • Loading branch information...
leoetlino committed May 5, 2018
2 parents 86f56b8 + 96e488a commit bf8b9f4a3496522bc8478e9aa5d8c21f2bd44d05
@@ -6,6 +6,7 @@
#include <QFrame>
#include <QLayout>
#include <QPalette>
#include <QScrollArea>
#include <QVBoxLayout>
#include <QWidget>
@@ -29,6 +30,12 @@ QWidget* GetWrappedWidget(QWidget* wrapped_widget, QWidget* to_resize, int margi
std::max(recommended_height, to_resize->height()));
}
// Make sure the background color stays consistent with the parent widget
QPalette p = wrapped_widget->palette();
p.setColor(QPalette::Window, QColor(0, 0, 0, 0));
wrapped_widget->setPalette(p);
scroll->setPalette(p);
return scroll;
}
@@ -118,7 +118,6 @@ void AudioPane::CreateWidgets()
m_main_layout->addWidget(backend_box, 1, 0, 1, -1);
m_main_layout->addWidget(stretching_box, 2, 0, 1, -1);
m_main_layout->setContentsMargins(0, 0, 0, 0);
setLayout(m_main_layout);
}
@@ -58,7 +58,6 @@ void GeneralPane::CreateLayout()
#endif
CreateAdvanced();
m_main_layout->setContentsMargins(0, 0, 0, 0);
m_main_layout->addStretch(1);
setLayout(m_main_layout);
}
@@ -84,7 +84,6 @@ void InterfacePane::CreateLayout()
CreateUI();
CreateInGame();
m_main_layout->setContentsMargins(0, 0, 0, 0);
m_main_layout->addStretch(1);
setLayout(m_main_layout);
}
@@ -25,7 +25,6 @@ PathPane::PathPane(QWidget* parent) : QWidget(parent)
layout->addWidget(MakeGameFolderBox());
layout->addLayout(MakePathsLayout());
layout->setContentsMargins(0, 0, 0, 0);
setLayout(layout);
}
@@ -159,15 +158,15 @@ QGridLayout* PathPane::MakePathsLayout()
[this] { Settings::Instance().SetDefaultGame(m_game_edit->text()); });
connect(&Settings::Instance(), &Settings::DefaultGameChanged,
[this](const QString& path) { m_game_edit->setText(path); });
QPushButton* game_open = new QPushButton;
QPushButton* game_open = new QPushButton(QStringLiteral("..."));
connect(game_open, &QPushButton::clicked, this, &PathPane::BrowseDefaultGame);
layout->addWidget(new QLabel(tr("Default ISO:")), 0, 0);
layout->addWidget(m_game_edit, 0, 1);
layout->addWidget(game_open, 0, 2);
m_nand_edit = new QLineEdit(QString::fromStdString(SConfig::GetInstance().m_NANDPath));
connect(m_nand_edit, &QLineEdit::editingFinished, this, &PathPane::OnNANDPathChanged);
QPushButton* nand_open = new QPushButton;
QPushButton* nand_open = new QPushButton(QStringLiteral("..."));
connect(nand_open, &QPushButton::clicked, this, &PathPane::BrowseWiiNAND);
layout->addWidget(new QLabel(tr("Wii NAND Root:")), 1, 0);
layout->addWidget(m_nand_edit, 1, 1);
@@ -176,15 +175,15 @@ QGridLayout* PathPane::MakePathsLayout()
m_dump_edit = new QLineEdit(QString::fromStdString(SConfig::GetInstance().m_DumpPath));
connect(m_dump_edit, &QLineEdit::editingFinished,
[=] { SConfig::GetInstance().m_DumpPath = m_dump_edit->text().toStdString(); });
QPushButton* dump_open = new QPushButton;
QPushButton* dump_open = new QPushButton(QStringLiteral("..."));
connect(dump_open, &QPushButton::clicked, this, &PathPane::BrowseDump);
layout->addWidget(new QLabel(tr("Dump Path:")), 2, 0);
layout->addWidget(m_dump_edit, 2, 1);
layout->addWidget(dump_open, 2, 2);
m_sdcard_edit = new QLineEdit(QString::fromStdString(SConfig::GetInstance().m_strWiiSDCardPath));
connect(m_sdcard_edit, &QLineEdit::editingFinished, this, &PathPane::OnSDCardPathChanged);
QPushButton* sdcard_open = new QPushButton;
QPushButton* sdcard_open = new QPushButton(QStringLiteral("..."));
connect(sdcard_open, &QPushButton::clicked, this, &PathPane::BrowseSDCard);
layout->addWidget(new QLabel(tr("SD Card Path:")), 3, 0);
layout->addWidget(m_sdcard_edit, 3, 1);
@@ -52,7 +52,6 @@ void WiiPane::CreateLayout()
CreateMisc();
CreateWhitelistedUSBPassthroughDevices();
CreateWiiRemoteSettings();
m_main_layout->setContentsMargins(0, 0, 0, 0);
m_main_layout->addStretch(1);
setLayout(m_main_layout);
}

0 comments on commit bf8b9f4

Please sign in to comment.