Skip to content

Commit

Permalink
Merge branch 'v2.5' into snappy
Browse files Browse the repository at this point in the history
  • Loading branch information
janbar committed Jan 17, 2018
2 parents 42aa4bf + 36c61aa commit 5ad1eee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
13 changes: 13 additions & 0 deletions app/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: ""
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5ad1eee

Please sign in to comment.