Merge pull request #6739 from spycrab/qt_aesthetics
Qt: Fix visual inconsistencies.
This commit is contained in:
commit
bf8b9f4a34
|
@ -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,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);
|
||||
|
@ -167,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);
|
||||
|
@ -176,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);
|
||||
|
@ -184,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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue