From 25841519d18372a7519e66958000b5a95853ec34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20B=C3=A5ngens?= Date: Tue, 13 Aug 2024 10:17:18 +0200 Subject: [PATCH] add start in fullscreen flag and fix list scroll size --- src/TombRaiderLinuxLauncher.cpp | 5 ----- src/TombRaiderLinuxLauncher.ui | 23 +++++++++++++++++++++++ src/main.cpp | 9 ++++++++- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/TombRaiderLinuxLauncher.cpp b/src/TombRaiderLinuxLauncher.cpp index 9a4c078..baff30f 100644 --- a/src/TombRaiderLinuxLauncher.cpp +++ b/src/TombRaiderLinuxLauncher.cpp @@ -97,11 +97,6 @@ void TombRaiderLinuxLauncher::checkCommonFiles(bool status) void TombRaiderLinuxLauncher::generateList() { - ui->listWidgetModds->setIconSize(QSize(320, 240)); - QFont defaultFont = QApplication::font(); - int newSize = 22; - defaultFont.setPointSize(newSize); - ui->listWidgetModds->setFont(defaultFont); const QString& directoryPath = settings.value("levelPath").toString(); const QString& pictures = ":/pictures/pictures/"; diff --git a/src/TombRaiderLinuxLauncher.ui b/src/TombRaiderLinuxLauncher.ui index 939b282..260dd24 100644 --- a/src/TombRaiderLinuxLauncher.ui +++ b/src/TombRaiderLinuxLauncher.ui @@ -55,9 +55,32 @@ + + + 22 + + 0 + + Qt::ScrollBarAsNeeded + + + QAbstractScrollArea::AdjustToContents + + + + 320 + 240 + + + + QAbstractItemView::ScrollPerPixel + + + QListView::Adjust + diff --git a/src/main.cpp b/src/main.cpp index 0381656..92799f4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,6 +14,13 @@ int main(int argc, char *argv[]) // Construct the QSettings object TombRaiderLinuxLauncher w; - w.show(); + + QStringList arguments = a.arguments(); + if (arguments.contains("--fullscreen")) { + w.showFullScreen(); + } else { + w.show(); + } + return a.exec(); }