add more dialogs as fullscreen when in gamescope

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2024-05-31 19:45:36 +03:00
parent 4f42580440
commit 1709060a73
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318
6 changed files with 27 additions and 4 deletions

View File

@ -68,6 +68,10 @@ InstanceWindow::InstanceWindow(InstancePtr instance, QWidget* parent) : QMainWin
{
auto provider = std::make_shared<InstancePageProvider>(m_instance);
m_container = new PageContainer(provider.get(), "console", this);
if (DesktopServices::isGameScope()) {
m_container->showFullScreen();
m_container->setFixedSize(this->width(), this->height());
}
m_container->setParentContainer(this);
setCentralWidget(m_container);
setContentsMargins(0, 0, 0, 0);

View File

@ -41,6 +41,7 @@
#include <QFileDialog>
#include <QFileSystemModel>
#include <QMessageBox>
#include "DesktopServices.h"
#include "FileIgnoreProxy.h"
#include "QObjectPtr.h"
#include "ui/dialogs/CustomMessageBox.h"
@ -89,6 +90,11 @@ ExportInstanceDialog::ExportInstanceDialog(InstancePtr instance, QWidget* parent
m_ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK"));
if (DesktopServices::isGameScope()) {
showFullScreen();
setFixedSize(this->width(), this->height());
}
}
ExportInstanceDialog::~ExportInstanceDialog()

View File

@ -17,6 +17,8 @@
*/
#include "ExportPackDialog.h"
#include "DesktopServices.h"
#include "minecraft/mod/ModFolderModel.h"
#include "minecraft/mod/ResourceFolderModel.h"
#include "modplatform/ModIndex.h"
#include "modplatform/flame/FlamePackExportTask.h"
@ -121,6 +123,11 @@ ExportPackDialog::ExportPackDialog(MinecraftInstancePtr instance, QWidget* paren
m_ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK"));
if (DesktopServices::isGameScope()) {
showFullScreen();
setFixedSize(this->width(), this->height());
}
}
ExportPackDialog::~ExportPackDialog()

View File

@ -20,6 +20,7 @@
#include <QCheckBox>
#include <QComboBox>
#include <QTextEdit>
#include "DesktopServices.h"
#include "FileSystem.h"
#include "Markdown.h"
#include "StringUtils.h"
@ -68,6 +69,10 @@ ExportToModListDialog::ExportToModListDialog(QString name, QList<Mod*> mods, QWi
ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));
ui->buttonBox->button(QDialogButtonBox::Save)->setText(tr("Save"));
triggerImp();
if (DesktopServices::isGameScope()) {
showFullScreen();
setFixedSize(this->width(), this->height());
}
}
ExportToModListDialog::~ExportToModListDialog()

View File

@ -1,4 +1,5 @@
#include "NewsDialog.h"
#include "DesktopServices.h"
#include "ui_NewsDialog.h"
NewsDialog::NewsDialog(QList<NewsEntryPtr> entries, QWidget* parent) : QDialog(parent), ui(new Ui::NewsDialog())
@ -23,6 +24,10 @@ NewsDialog::NewsDialog(QList<NewsEntryPtr> entries, QWidget* parent) : QDialog(p
ui->currentArticleContentBrowser->setText(article_entry->content);
ui->currentArticleContentBrowser->flush();
if (DesktopServices::isGameScope()) {
showFullScreen();
setFixedSize(this->width(), this->height());
}
}
NewsDialog::~NewsDialog()

View File

@ -98,10 +98,6 @@ InstanceSettingsPage::InstanceSettingsPage(BaseInstance* inst, QWidget* parent)
loadSettings();
updateThresholds();
if (DesktopServices::isGameScope()) {
showFullScreen();
setFixedSize(this->width(), this->height());
}
}
InstanceSettingsPage::~InstanceSettingsPage()