mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 09:59:59 +03:00
Make page container hug edges of dialog <3
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
40d1dccb9b
commit
2b949d5fdd
9 changed files with 28 additions and 11 deletions
|
|
@ -92,11 +92,13 @@ InstallLoaderDialog::InstallLoaderDialog(std::shared_ptr<PackProfile> profile, c
|
|||
: QDialog(parent), profile(std::move(profile)), container(new PageContainer(this, QString(), this)), buttons(new QDialogButtonBox(this))
|
||||
{
|
||||
auto layout = new QVBoxLayout(this);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
container->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
|
||||
layout->addWidget(container);
|
||||
|
||||
auto buttonLayout = new QHBoxLayout(this);
|
||||
buttonLayout->setContentsMargins(0, 0, 6, 6);
|
||||
|
||||
auto refreshButton = new QPushButton(tr("&Refresh"), this);
|
||||
connect(refreshButton, &QPushButton::clicked, this, [this] { pageCast(container->selectedPage())->loadList(); });
|
||||
|
|
@ -110,7 +112,7 @@ InstallLoaderDialog::InstallLoaderDialog(std::shared_ptr<PackProfile> profile, c
|
|||
connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||
buttonLayout->addWidget(buttons);
|
||||
|
||||
layout->addLayout(buttonLayout);
|
||||
container->addButtons(buttonLayout);
|
||||
|
||||
setWindowTitle(dialogTitle());
|
||||
setWindowModality(Qt::WindowModal);
|
||||
|
|
@ -167,4 +169,4 @@ void InstallLoaderDialog::done(int result)
|
|||
|
||||
QDialog::done(result);
|
||||
}
|
||||
#include "InstallLoaderDialog.moc"
|
||||
#include "InstallLoaderDialog.moc"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue