diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-02-08 11:08:03 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-08 13:58:54 -0800 |
commit | 9069f3364d971c4387fd6fa048f73323240bccf9 (patch) | |
tree | 291711c5039a1ab814533b8fb195b50f5b34cbf1 /core/settings/qPrefDisplay.cpp | |
parent | 641ca47fd5e53cdddb01d3ee127274012fa5a9cb (diff) | |
download | subsurface-9069f3364d971c4387fd6fa048f73323240bccf9.tar.gz |
core/settings: add new preference to limit number of columns on mobile
The idea is that in portrait mode we can force the display to be single column (which
makes sure that the profile in dive display mode is nice and big).
This commit only implements the preference variable that we need for that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/settings/qPrefDisplay.cpp')
-rw-r--r-- | core/settings/qPrefDisplay.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/settings/qPrefDisplay.cpp b/core/settings/qPrefDisplay.cpp index d29134d69..cea33a90a 100644 --- a/core/settings/qPrefDisplay.cpp +++ b/core/settings/qPrefDisplay.cpp @@ -41,6 +41,9 @@ static const QByteArray st_windowState_default; int qPrefDisplay::st_lastState; static int st_lastState_default = false; +bool qPrefDisplay::st_singleColumnPortrait; +static bool st_singleColumnPortrait_default = false; + qPrefDisplay *qPrefDisplay::instance() { static qPrefDisplay *self = new qPrefDisplay; @@ -66,7 +69,7 @@ void qPrefDisplay::loadSync(bool doSync) load_geometry(); load_windowState(); load_lastState(); - + load_singleColumnPortrait(); } } @@ -198,3 +201,5 @@ HANDLE_PROP_QBYTEARRAY(Display, "MainWindow/geometry", geometry); HANDLE_PROP_QBYTEARRAY(Display, "MainWindow/windowState", windowState); HANDLE_PROP_INT(Display, "MainWindow/lastState", lastState); + +HANDLE_PROP_BOOL(Display, "singleColumnPortrait", singleColumnPortrait); |