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>
This commit is contained in:
Dirk Hohndel 2020-02-08 11:08:03 -08:00
parent 641ca47fd5
commit 9069f3364d
2 changed files with 12 additions and 1 deletions

View file

@ -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);