diff --git a/nymea-app/styles/dark/ApplicationWindow.qml b/nymea-app/styles/dark/ApplicationWindow.qml index 17031ca4..451c3478 100644 --- a/nymea-app/styles/dark/ApplicationWindow.qml +++ b/nymea-app/styles/dark/ApplicationWindow.qml @@ -33,5 +33,5 @@ ApplicationWindow { "pressuresensor": "grey" } - property bool showConnectionTabs: false + property bool industrialSetup: true } diff --git a/nymea-app/styles/light/ApplicationWindow.qml b/nymea-app/styles/light/ApplicationWindow.qml index c4fa8a8c..9bb576e7 100644 --- a/nymea-app/styles/light/ApplicationWindow.qml +++ b/nymea-app/styles/light/ApplicationWindow.qml @@ -31,6 +31,4 @@ ApplicationWindow { "pressuresensor": "grey" } - property bool showConnectionTabs: false - } diff --git a/nymea-app/ui/Nymea.qml b/nymea-app/ui/Nymea.qml index 303dc93d..9ac099c5 100644 --- a/nymea-app/ui/Nymea.qml +++ b/nymea-app/ui/Nymea.qml @@ -20,7 +20,7 @@ ApplicationWindow { Material.accent: accentColor Material.foreground: foregroundColor - property int margins: 14 + property int margins: 16 property int bigMargins: 20 property int extraSmallFont: 10 property int smallFont: 13 @@ -41,6 +41,7 @@ ApplicationWindow { property int currentMainViewIndex: 0 property bool showHiddenOptions: false property int cloudEnvironment: 0 + property bool showConnectionTabs: app.hasOwnProperty("industrialSetup") && app.industrialSetup } RootItem { diff --git a/nymea-app/ui/RootItem.qml b/nymea-app/ui/RootItem.qml index 292becbc..500d96db 100644 --- a/nymea-app/ui/RootItem.qml +++ b/nymea-app/ui/RootItem.qml @@ -232,11 +232,12 @@ Item { } RowLayout { - visible: app.showConnectionTabs + visible: settings.showConnectionTabs TabBar { id: tabbar Layout.fillWidth: true + Material.elevation: 2 Repeater { model: mainRepeater.count diff --git a/nymea-app/ui/appsettings/AppSettingsPage.qml b/nymea-app/ui/appsettings/AppSettingsPage.qml index 450581d1..b2389bc8 100644 --- a/nymea-app/ui/appsettings/AppSettingsPage.qml +++ b/nymea-app/ui/appsettings/AppSettingsPage.qml @@ -13,15 +13,17 @@ Page { onBackPressed: pageStack.pop() } - ColumnLayout { - anchors { left: parent.left; right: parent.right; top: parent.top } + Flickable { + anchors.fill: parent + contentHeight: contentColumn.implicitHeight + interactive: contentHeight > height ColumnLayout { - Layout.fillWidth: true - Layout.margins: app.margins + id: contentColumn + width: parent.width RowLayout { - Layout.fillWidth: true + Layout.fillWidth: true; Layout.leftMargin: app.margins; Layout.rightMargin: app.margins; Layout.topMargin: app.margins Label { Layout.fillWidth: true text: qsTr("View mode") @@ -55,7 +57,7 @@ Page { } RowLayout { - Layout.fillWidth: true + Layout.fillWidth: true; Layout.leftMargin: app.margins; Layout.rightMargin: app.margins visible: appBranding.length === 0 Label { Layout.fillWidth: true @@ -80,18 +82,7 @@ Page { } RowLayout { - Layout.fillWidth: true - Label { - Layout.fillWidth: true - text: qsTr("Return to home on idle") - } - CheckBox { - checked: settings.returnToHome - onClicked: settings.returnToHome = checked - } - } - RowLayout { - Layout.fillWidth: true + Layout.fillWidth: true; Layout.leftMargin: app.margins; Layout.rightMargin: app.margins Label { Layout.fillWidth: true text: qsTr("Graph style") @@ -106,32 +97,45 @@ Page { text: qsTr("Lines") onClicked: settings.graphStyle = "bezier" } - + } + CheckDelegate { + Layout.fillWidth: true + text: qsTr("Return to home on idle") + checked: settings.returnToHome + onClicked: settings.returnToHome = checked + } + CheckDelegate { + Layout.fillWidth: true + text: qsTr("Show connection tabs") + checked: settings.showConnectionTabs + onClicked: settings.showConnectionTabs = checked + } + ThinDivider {} + MeaListItemDelegate { + Layout.fillWidth: true + text: qsTr("Cloud login") + iconName: "../images/cloud.svg" + onClicked: pageStack.push(Qt.resolvedUrl("CloudLoginPage.qml")) + } + MeaListItemDelegate { + Layout.fillWidth: true + text: qsTr("About %1").arg(app.appName) + iconName: "../images/info.svg" + onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml")) + } + MeaListItemDelegate { + Layout.fillWidth: true + Layout.bottomMargin: app.margins + visible: settings.showHiddenOptions + text: qsTr("Developer options") + iconName: "../images/configure.svg" + onClicked: pageStack.push(Qt.resolvedUrl("DeveloperOptionsPage.qml")) } } - ThinDivider {} - MeaListItemDelegate { - Layout.fillWidth: true - text: qsTr("Cloud login") - iconName: "../images/cloud.svg" - onClicked: pageStack.push(Qt.resolvedUrl("CloudLoginPage.qml")) - } - MeaListItemDelegate { - Layout.fillWidth: true - text: qsTr("About %1").arg(app.appName) - iconName: "../images/info.svg" - onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml")) - } - MeaListItemDelegate { - Layout.fillWidth: true - visible: settings.showHiddenOptions - text: qsTr("Developer options") - iconName: "../images/configure.svg" - onClicked: pageStack.push(Qt.resolvedUrl("DeveloperOptionsPage.qml")) - } } + Component { id: styleChangedDialog Dialog { diff --git a/nymea-app/ui/appsettings/DeveloperOptionsPage.qml b/nymea-app/ui/appsettings/DeveloperOptionsPage.qml index dd2c174b..267770f4 100644 --- a/nymea-app/ui/appsettings/DeveloperOptionsPage.qml +++ b/nymea-app/ui/appsettings/DeveloperOptionsPage.qml @@ -32,7 +32,4 @@ Page { } } } - - - }