diff options
author | Tayou <31988415+TayouVR@users.noreply.github.com> | 2023-08-07 10:32:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-07 10:32:38 +0200 |
commit | 9afa7cc91fd889b146c609c6a59f7f7b3d995d9f (patch) | |
tree | 20ef3bd30beedca4995875485e468ee323d52096 /launcher/ui/pagedialog/PageDialog.cpp | |
parent | b572f75dbaad61cf305f1fd4f60ba94d74bfa3fa (diff) | |
parent | 75c7df46a7022a46d447bb96fbde619e5d65db05 (diff) | |
download | PrismLauncher-9afa7cc91fd889b146c609c6a59f7f7b3d995d9f.tar.gz PrismLauncher-9afa7cc91fd889b146c609c6a59f7f7b3d995d9f.tar.bz2 PrismLauncher-9afa7cc91fd889b146c609c6a59f7f7b3d995d9f.zip |
Merge branch 'develop' into icon-indexing
Signed-off-by: Tayou <31988415+TayouVR@users.noreply.github.com>
Diffstat (limited to 'launcher/ui/pagedialog/PageDialog.cpp')
-rw-r--r-- | launcher/ui/pagedialog/PageDialog.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/launcher/ui/pagedialog/PageDialog.cpp b/launcher/ui/pagedialog/PageDialog.cpp index 18d61dc2..6514217c 100644 --- a/launcher/ui/pagedialog/PageDialog.cpp +++ b/launcher/ui/pagedialog/PageDialog.cpp @@ -16,9 +16,9 @@ #include "PageDialog.h" #include <QDialogButtonBox> +#include <QKeyEvent> #include <QPushButton> #include <QVBoxLayout> -#include <QKeyEvent> #include "Application.h" #include "settings/SettingsObject.h" @@ -26,19 +26,18 @@ #include "ui/widgets/IconLabel.h" #include "ui/widgets/PageContainer.h" -PageDialog::PageDialog(BasePageProvider *pageProvider, QString defaultId, QWidget *parent) - : QDialog(parent) +PageDialog::PageDialog(BasePageProvider* pageProvider, QString defaultId, QWidget* parent) : QDialog(parent) { setWindowTitle(pageProvider->dialogTitle()); m_container = new PageContainer(pageProvider, defaultId, this); - QVBoxLayout *mainLayout = new QVBoxLayout; + QVBoxLayout* mainLayout = new QVBoxLayout; mainLayout->addWidget(m_container); mainLayout->setSpacing(0); mainLayout->setContentsMargins(0, 0, 0, 0); setLayout(mainLayout); - QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Help | QDialogButtonBox::Close); + QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Help | QDialogButtonBox::Close); buttons->button(QDialogButtonBox::Close)->setDefault(true); buttons->setContentsMargins(6, 0, 6, 0); m_container->addButtons(buttons); @@ -49,11 +48,10 @@ PageDialog::PageDialog(BasePageProvider *pageProvider, QString defaultId, QWidge restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get("PagedGeometry").toByteArray())); } -void PageDialog::closeEvent(QCloseEvent *event) +void PageDialog::closeEvent(QCloseEvent* event) { qDebug() << "Paged dialog close requested"; - if (m_container->prepareToClose()) - { + if (m_container->prepareToClose()) { qDebug() << "Paged dialog close approved"; APPLICATION->settings()->set("PagedGeometry", saveGeometry().toBase64()); qDebug() << "Paged dialog geometry saved"; |