diff --git a/app/advancedconfigpage.ui b/app/advancedconfigpage.ui
--- a/app/advancedconfigpage.ui
+++ b/app/advancedconfigpage.ui
@@ -7,7 +7,7 @@
0
0
482
- 300
+ 430
@@ -55,7 +55,7 @@
- -
+
-
Qt::Vertical
@@ -121,7 +121,7 @@
- -
+
-
Rendering intent:
@@ -134,7 +134,7 @@
- -
+
-
-
@@ -148,7 +148,7 @@
- -
+
-
Scale all colors equally to fit them within the active color profile's color gamut
@@ -158,7 +158,7 @@
- -
+
-
Qt::Vertical
@@ -174,7 +174,7 @@
- -
+
-
-
@@ -188,7 +188,7 @@
- -
+
-
Squash colors that don't fit within the active color profile's color gamut, leaving other colors untouched
@@ -198,7 +198,7 @@
- -
+
-
Qt::Vertical
@@ -211,6 +211,56 @@
+ -
+
+
+ Window start mode:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 20
+
+
+
+
+ -
+
+
-
+
+
+ Restore previous fullscreen state
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
diff --git a/app/main.cpp b/app/main.cpp
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -38,6 +38,7 @@
// Local
#include
#include
+#include
#include "mainwindow.h"
#ifdef HAVE_FITS
@@ -138,6 +139,8 @@
aboutData.data()->setupCommandLine(&parser);
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("f") << QStringLiteral("fullscreen"),
i18n("Start in fullscreen mode")));
+ parser.addOption(QCommandLineOption(QStringLiteral("no-fullscreen"),
+ i18n("Start in normal (non-fullscreen) mode")));
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("s") << QStringLiteral("slideshow"),
i18n("Start in slideshow mode")));
parser.addHelpOption();
@@ -149,10 +152,19 @@
//KF5 TODO
//Gwenview::ImageFormats::registerPlugins();
+ bool fullscreen = false;
+ if (parser.isSet(QStringLiteral("fullscreen"))) {
+ fullscreen = true;
+ } else if (parser.isSet(QStringLiteral("no-fullscreen"))) {
+ fullscreen = false;
+ } else if (Gwenview::GwenviewConfig::rememberFullScreenMode()) {
+ fullscreen = Gwenview::GwenviewConfig::fullScreenModeActive();
+ }
+
// startHelper must live for the whole life of the application
StartHelper startHelper(parser.positionalArguments(),
- parser.isSet(QStringLiteral("f")),
- parser.isSet(QStringLiteral("s")));
+ fullscreen,
+ parser.isSet(QStringLiteral("slideshow")));
if (app.isSessionRestored()) {
kRestoreMainWindows();
} else {
diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
--- a/app/mainwindow.cpp
+++ b/app/mainwindow.cpp
@@ -1489,6 +1489,7 @@
d->mViewMainPage->saveConfig();
d->mBrowseMainPage->saveConfig();
d->mContextManager->saveConfig();
+ GwenviewConfig::setFullScreenModeActive(isFullScreen());
}
void MainWindow::print()
diff --git a/lib/gwenviewconfig.kcfg b/lib/gwenviewconfig.kcfg
--- a/lib/gwenviewconfig.kcfg
+++ b/lib/gwenviewconfig.kcfg
@@ -114,6 +114,12 @@
true
+
+ true
+
+
+ false
+