From b741ef81bd06a0f70695abe3a0238380b4348405 Mon Sep 17 00:00:00 2001 From: spycrab Date: Wed, 2 May 2018 20:08:46 +0200 Subject: [PATCH 1/3] Qt/WrapInScrollArea: Make background color more consistent --- Source/Core/DolphinQt2/QtUtils/WrapInScrollArea.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Core/DolphinQt2/QtUtils/WrapInScrollArea.cpp b/Source/Core/DolphinQt2/QtUtils/WrapInScrollArea.cpp index 1327092bb3..32ffb0c652 100644 --- a/Source/Core/DolphinQt2/QtUtils/WrapInScrollArea.cpp +++ b/Source/Core/DolphinQt2/QtUtils/WrapInScrollArea.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -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; } From d97d9167586ea032e72ce6de76ba1aac273fee1c Mon Sep 17 00:00:00 2001 From: spycrab Date: Wed, 2 May 2018 20:14:50 +0200 Subject: [PATCH 2/3] Qt/Settings: Restore padding --- Source/Core/DolphinQt2/Settings/AudioPane.cpp | 1 - Source/Core/DolphinQt2/Settings/GeneralPane.cpp | 1 - Source/Core/DolphinQt2/Settings/InterfacePane.cpp | 1 - Source/Core/DolphinQt2/Settings/PathPane.cpp | 1 - Source/Core/DolphinQt2/Settings/WiiPane.cpp | 1 - 5 files changed, 5 deletions(-) diff --git a/Source/Core/DolphinQt2/Settings/AudioPane.cpp b/Source/Core/DolphinQt2/Settings/AudioPane.cpp index 4af0f139de..6174969b51 100644 --- a/Source/Core/DolphinQt2/Settings/AudioPane.cpp +++ b/Source/Core/DolphinQt2/Settings/AudioPane.cpp @@ -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); } diff --git a/Source/Core/DolphinQt2/Settings/GeneralPane.cpp b/Source/Core/DolphinQt2/Settings/GeneralPane.cpp index 5a77c3bd77..a50640f944 100644 --- a/Source/Core/DolphinQt2/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt2/Settings/GeneralPane.cpp @@ -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); } diff --git a/Source/Core/DolphinQt2/Settings/InterfacePane.cpp b/Source/Core/DolphinQt2/Settings/InterfacePane.cpp index bed3ca46d1..f812573da0 100644 --- a/Source/Core/DolphinQt2/Settings/InterfacePane.cpp +++ b/Source/Core/DolphinQt2/Settings/InterfacePane.cpp @@ -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); } diff --git a/Source/Core/DolphinQt2/Settings/PathPane.cpp b/Source/Core/DolphinQt2/Settings/PathPane.cpp index 1f09370507..7c9d45c2a1 100644 --- a/Source/Core/DolphinQt2/Settings/PathPane.cpp +++ b/Source/Core/DolphinQt2/Settings/PathPane.cpp @@ -25,7 +25,6 @@ PathPane::PathPane(QWidget* parent) : QWidget(parent) layout->addWidget(MakeGameFolderBox()); layout->addLayout(MakePathsLayout()); - layout->setContentsMargins(0, 0, 0, 0); setLayout(layout); } diff --git a/Source/Core/DolphinQt2/Settings/WiiPane.cpp b/Source/Core/DolphinQt2/Settings/WiiPane.cpp index 11137f6bb7..89b3f6eb76 100644 --- a/Source/Core/DolphinQt2/Settings/WiiPane.cpp +++ b/Source/Core/DolphinQt2/Settings/WiiPane.cpp @@ -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); } From 96e488a18139159b3fe63500d66b7be36cffb09d Mon Sep 17 00:00:00 2001 From: spycrab Date: Wed, 2 May 2018 20:16:57 +0200 Subject: [PATCH 3/3] Qt/PathPane: Add dots to buttons --- Source/Core/DolphinQt2/Settings/PathPane.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/DolphinQt2/Settings/PathPane.cpp b/Source/Core/DolphinQt2/Settings/PathPane.cpp index 7c9d45c2a1..c1bf86499f 100644 --- a/Source/Core/DolphinQt2/Settings/PathPane.cpp +++ b/Source/Core/DolphinQt2/Settings/PathPane.cpp @@ -158,7 +158,7 @@ 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); @@ -166,7 +166,7 @@ QGridLayout* PathPane::MakePathsLayout() 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); @@ -175,7 +175,7 @@ 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); @@ -183,7 +183,7 @@ QGridLayout* PathPane::MakePathsLayout() 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);