From 08d616889a72695f249d83fc529bc92552118eb4 Mon Sep 17 00:00:00 2001 From: janbar Date: Wed, 17 Jan 2018 06:54:19 +0000 Subject: [PATCH 1/2] allow to set and store the display scale factor --- app/Main.qml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/Main.qml b/app/Main.qml index 33f63d09..5d4bc576 100644 --- a/app/Main.qml +++ b/app/Main.qml @@ -66,6 +66,12 @@ MainView { help: "Start Noson in a debug mode. Will show more output." required: false } + Argument { + name: "scalefactor" + help: "set a scale factor" + valueNames: ["FACTOR"] + required: false + } } // Startup settings @@ -77,6 +83,8 @@ MainView { property string zoneName: "" property int tabIndex: -1 property double width: mainView.width + property double height: mainView.height + property real scaleFactor: 1.0 property string accounts: "" } @@ -179,6 +187,10 @@ MainView { if (args.values.debug) { mainView.debugLevel = 4 } + if (args.values.scalefactor) { + startupSettings.scaleFactor = args.values.scalefactor + } + units.gridUnit *= startupSettings.scaleFactor; customdebug("LANG=" + Qt.locale().name); Sonos.setLocale(Qt.locale().name); // initialize all data models @@ -208,6 +220,7 @@ MainView { // resize main view according to user settings mainView.width = (startupSettings.width >= units.gu(44) ? startupSettings.width : units.gu(44)); + mainView.height = (startupSettings.height >= units.gu(80) ? startupSettings.height : units.gu(80)); // init SMAPI third party accounts (AppLink) var acls = deserializeACLS(startupSettings.accounts); From 36c61aa2d18008961ed34b4ab6d389d0dc4a9e38 Mon Sep 17 00:00:00 2001 From: janbar Date: Wed, 17 Jan 2018 06:56:23 +0000 Subject: [PATCH 2/2] bump version 2.5.1 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb0a63df..d738e796 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}") option(INSTALL_TESTS "Install the tests on make install" on) option(CLICK_MODE "Installs to a contained location" on) -set(APP_VERSION 2.5.0) +set(APP_VERSION 2.5.1) set(APP_NAME noson) set(APP_ID "noson.janbar") set(MAIN_QML "Main.qml")