From 5f9fb02e32631230dbfda65ce2992c9e469a4641 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Fri, 3 Aug 2018 21:14:50 +0200 Subject: [PATCH] better styling --- nymea-app/styles/dark/ApplicationWindow.qml | 31 ++++++++++---- nymea-app/styles/light/ApplicationWindow.qml | 27 ++++++++++-- nymea-app/ui/ConnectPage.qml | 12 +++--- nymea-app/ui/LoginPage.qml | 2 +- nymea-app/ui/MagicPage.qml | 2 +- nymea-app/ui/Nymea.qml | 41 +++++++++++-------- nymea-app/ui/PushButtonAuthPage.qml | 4 +- nymea-app/ui/WirelessControlerPage.qml | 4 +- .../ui/components/EmptyViewPlaceholder.qml | 2 +- nymea-app/ui/components/FancyHeader.qml | 6 ++- nymea-app/ui/components/GuhHeader.qml | 1 + nymea-app/ui/components/MainPageTabButton.qml | 4 +- nymea-app/ui/components/MeaDialog.qml | 4 +- .../ui/components/MeaListItemDelegate.qml | 2 +- nymea-app/ui/components/ThinDivider.qml | 2 +- .../customviews/ExtendedVolumeController.qml | 2 +- .../ui/customviews/GenericTypeLogView.qml | 4 +- .../ui/devicepages/ColorLightDevicePage.qml | 4 +- .../ui/devicepages/ConfigureThingPage.qml | 2 +- .../ui/devicepages/GarageGateDevicePage.qml | 2 +- nymea-app/ui/devicepages/StateLogPage.qml | 2 +- nymea-app/ui/magic/DeviceRulesPage.qml | 4 +- nymea-app/ui/magic/EditRulePage.qml | 4 +- .../ui/magic/SimpleStateEvaluatorDelegate.qml | 4 +- .../ui/mainviews/DevicesPageDelegate.qml | 6 +-- nymea-app/ui/mainviews/FavoritesView.qml | 14 +++---- nymea-app/ui/mainviews/ScenesView.qml | 2 +- nymea-app/ui/system/LogViewerPage.qml | 2 +- 28 files changed, 123 insertions(+), 73 deletions(-) diff --git a/nymea-app/styles/dark/ApplicationWindow.qml b/nymea-app/styles/dark/ApplicationWindow.qml index 2b501ab5..3654910b 100644 --- a/nymea-app/styles/dark/ApplicationWindow.qml +++ b/nymea-app/styles/dark/ApplicationWindow.qml @@ -3,16 +3,33 @@ import QtQuick.Templates 2.2 import QtQuick.Controls.Material 2.2 ApplicationWindow { - property color guhAccent: "#ff57baae" + Material.theme: Material.Dark + + // The system (box) name. property string systemName: "nymea" + + // The app name property string appName: "nymea:app" - Material.theme: Material.Dark - Material.accent: guhAccent - Material.primary: Material.background + // The header background color + property color primaryColor: Material.background - function interfaceToColor(name) { - return "khaki" + // Header font color + property color headerForegroundColor: Material.foreground + + // The font color + property color foregroundColor: Material.foreground + + // The color of selected/highlighted things + property color accentColor: "#ff57baae" + + // colors for interfaces, e.g. icons + property var interfaceColors: { + "temperaturesensor": "red", + "humiditysensor": "deepskyblue", + "moisturesensor":"blue", + "lightsensor": "orange", + "conductivitysensor": "green", + "pressuresensor": "grey" } - } diff --git a/nymea-app/styles/light/ApplicationWindow.qml b/nymea-app/styles/light/ApplicationWindow.qml index eebfc30f..3e1dd14e 100644 --- a/nymea-app/styles/light/ApplicationWindow.qml +++ b/nymea-app/styles/light/ApplicationWindow.qml @@ -3,12 +3,31 @@ import QtQuick.Templates 2.2 import QtQuick.Controls.Material 2.2 ApplicationWindow { - property color guhAccent: "#ff57baae" + // The system (box) name. property string systemName: "nymea" + + // The app name property string appName: "nymea:app" - Material.theme: Material.Light - Material.accent: guhAccent - Material.primary: "white" + // The header background color + property color primaryColor: "white" + // Header font color + property color headerForegroundColor: Material.foreground + + // The font color + property color foregroundColor: Material.foreground + + // The color of selected/highlighted things + property color accentColor: "#ff57baae" + + // colors for interfaces, e.g. icons + property var interfaceColors: { + "temperaturesensor": "red", + "humiditysensor": "deepskyblue", + "moisturesensor":"blue", + "lightsensor": "orange", + "conductivitysensor": "green", + "pressuresensor": "grey" + } } diff --git a/nymea-app/ui/ConnectPage.qml b/nymea-app/ui/ConnectPage.qml index 28c6325d..307b12c0 100644 --- a/nymea-app/ui/ConnectPage.qml +++ b/nymea-app/ui/ConnectPage.qml @@ -196,7 +196,7 @@ Page { } progressive: true secondaryIconName: "../images/network-secure.svg" - secondaryIconColor: isTrusted ? app.guhAccent : Material.foreground + secondaryIconColor: isTrusted ? app.accentColor : Material.foreground swipe.enabled: discoveryDeviceDelegate.discoveryDevice.deviceType === DiscoveryDevice.DeviceTypeNetwork onClicked: { @@ -361,7 +361,7 @@ Page { Layout.preferredHeight: app.iconSize * 2 Layout.preferredWidth: height name: certDialog.hasOldFingerprint ? "../images/lock-broken.svg" : "../images/info.svg" - color: certDialog.hasOldFingerprint ? "red" : app.guhAccent + color: certDialog.hasOldFingerprint ? "red" : app.accentColor } Label { @@ -369,7 +369,7 @@ Page { Layout.fillWidth: true wrapMode: Text.WordWrap text: certDialog.hasOldFingerprint ? qsTr("Warning") : qsTr("Hi there!") - color: certDialog.hasOldFingerprint ? "red" : app.guhAccent + color: certDialog.hasOldFingerprint ? "red" : app.accentColor font.pixelSize: app.largeFont } } @@ -468,7 +468,7 @@ Page { Layout.preferredHeight: app.iconSize * 2 Layout.preferredWidth: height name: "../images/info.svg" - color: app.guhAccent + color: app.accentColor } Label { @@ -476,7 +476,7 @@ Page { Layout.fillWidth: true wrapMode: Text.WrapAtWordBoundaryOrAnywhere text: dialog.title - color: app.guhAccent + color: app.accentColor font.pixelSize: app.largeFont } } @@ -557,7 +557,7 @@ Page { visible: model.sslEnabled name: "../images/network-secure.svg" property bool isTrusted: Engine.connection.isTrusted(dialog.discoveryDevice.toUrl(index)) - color: isTrusted ? app.guhAccent : keyColor + color: isTrusted ? app.accentColor : keyColor } } onClicked: { diff --git a/nymea-app/ui/LoginPage.qml b/nymea-app/ui/LoginPage.qml index 9bdfd81d..1ff06933 100644 --- a/nymea-app/ui/LoginPage.qml +++ b/nymea-app/ui/LoginPage.qml @@ -108,7 +108,7 @@ Page { : qsTr("The passwords don't match.") wrapMode: Text.WordWrap Layout.preferredHeight: confirmPasswordTextField.height * 2 - color: app.guhAccent + color: app.accentColor } Button { diff --git a/nymea-app/ui/MagicPage.qml b/nymea-app/ui/MagicPage.qml index 5bd11e39..f2329e99 100644 --- a/nymea-app/ui/MagicPage.qml +++ b/nymea-app/ui/MagicPage.qml @@ -78,7 +78,7 @@ Page { id: ruleDelegate width: parent.width iconName: "../images/" + (model.executable ? (iconTag ? iconTag.value : "slideshow") : "magic") + ".svg" - iconColor: model.executable ? (colorTag ? colorTag.value : app.guhAccent) : !model.enabled ? "red" : (model.active ? app.guhAccent : "grey") + iconColor: model.executable ? (colorTag ? colorTag.value : app.accentColor) : !model.enabled ? "red" : (model.active ? app.accentColor : "grey") text: model.name canDelete: true diff --git a/nymea-app/ui/Nymea.qml b/nymea-app/ui/Nymea.qml index f54c3e9e..ec34b930 100644 --- a/nymea-app/ui/Nymea.qml +++ b/nymea-app/ui/Nymea.qml @@ -1,5 +1,5 @@ import QtQuick 2.8 -import QtQuick.Controls 2.1 +import QtQuick.Controls 2.2 import QtQuick.Controls.Material 2.1 import QtQuick.Layouts 1.2 import Qt.labs.settings 1.0 @@ -13,7 +13,12 @@ ApplicationWindow { height: 580 visibility: ApplicationWindow.AutomaticVisibility font: Qt.application.font + + // Those variables must be present in the Style title: appName + Material.primary: primaryColor + Material.accent: accentColor + Material.foreground: foregroundColor property int margins: 14 property int bigMargins: 20 @@ -24,9 +29,9 @@ ApplicationWindow { property int iconSize: 30 property int delegateHeight: 60 - property bool landscape: app.width > app.height + readonly property bool landscape: app.width > app.height - property var settings: Settings { + readonly property var settings: Settings { property string lastConnectedHost: "" property alias viewMode: app.visibility property bool returnToHome: false @@ -258,21 +263,25 @@ ApplicationWindow { return ""; } + property var fallbackColors: { + "temperaturesensor": "red", + "humiditysensor": "deepskyblue", + "moisturesensor":"blue", + "lightsensor": "orange", + "conductivitysensor": "green", + "pressuresensor": "grey" + } + function interfaceToColor(name) { - switch (name) { - case "temperaturesensor": - return "red"; - case "humiditysensor": - return "deepskyblue"; - case "moisturesensor": - return "blue"; - case "lightsensor": - return "orange"; - case "conductivitysensor": - return "green"; - case "pressuresensor": - return "grey"; + // Try to load color map from style + if (interfaceColors[name]) { + return interfaceColors[name]; } + + if (fallbackColors[name]) { + return fallbackColors[name]; + } + return "grey"; } diff --git a/nymea-app/ui/PushButtonAuthPage.qml b/nymea-app/ui/PushButtonAuthPage.qml index 5fd673a1..35fae3de 100644 --- a/nymea-app/ui/PushButtonAuthPage.qml +++ b/nymea-app/ui/PushButtonAuthPage.qml @@ -42,12 +42,12 @@ Page { ColorIcon { height: app.iconSize * 2 width: height - color: app.guhAccent + color: app.accentColor name: "../images/info.svg" } Label { - color: app.guhAccent + color: app.accentColor text: qsTr("Authentication required") wrapMode: Text.WordWrap Layout.fillWidth: true diff --git a/nymea-app/ui/WirelessControlerPage.qml b/nymea-app/ui/WirelessControlerPage.qml index eccfbf6c..4b51ff1c 100644 --- a/nymea-app/ui/WirelessControlerPage.qml +++ b/nymea-app/ui/WirelessControlerPage.qml @@ -149,7 +149,7 @@ Page { return getWirelessStatusString() } - iconColor: model.selectedNetwork ? app.guhAccent : "#808080" + iconColor: model.selectedNetwork ? app.accentColor : "#808080" iconName: { if (model.protected) { if (model.signalStrength <= 25) @@ -316,7 +316,7 @@ Page { Layout.preferredHeight: app.iconSize Layout.preferredWidth: app.iconSize name: "../images/eye.svg" - color: passwordTextField.echoMode === TextInput.Normal ? app.guhAccent : keyColor + color: passwordTextField.echoMode === TextInput.Normal ? app.accentColor : keyColor MouseArea { anchors.fill: parent anchors.margins: -app.margins / 2 diff --git a/nymea-app/ui/components/EmptyViewPlaceholder.qml b/nymea-app/ui/components/EmptyViewPlaceholder.qml index 94bb823c..ad81094f 100644 --- a/nymea-app/ui/components/EmptyViewPlaceholder.qml +++ b/nymea-app/ui/components/EmptyViewPlaceholder.qml @@ -21,7 +21,7 @@ ColumnLayout { Layout.fillWidth: true wrapMode: Text.WordWrap horizontalAlignment: Text.AlignHCenter - color: app.guhAccent + color: app.accentColor } Label { id: textLabel diff --git a/nymea-app/ui/components/FancyHeader.qml b/nymea-app/ui/components/FancyHeader.qml index 9c3e7b0f..dceb7cf6 100644 --- a/nymea-app/ui/components/FancyHeader.qml +++ b/nymea-app/ui/components/FancyHeader.qml @@ -1,6 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.3 +import QtQuick.Controls.Material 2.1 ToolBar { id: root @@ -33,6 +34,7 @@ ToolBar { font.pixelSize: app.mediumFont elide: Text.ElideRight text: root.title + color: app.headerForegroundColor } HeaderButton { @@ -58,6 +60,7 @@ ToolBar { font.pixelSize: app.mediumFont elide: Text.ElideRight text: qsTr("menu") + color: app.headerForegroundColor } HeaderButton { @@ -96,7 +99,7 @@ ToolBar { anchors.fill: parent anchors.margins: app.margins / 2 border.width: 1 - border.color: app.guhAccent + border.color: app.accentColor color: "transparent" ColumnLayout { anchors.fill: parent @@ -116,6 +119,7 @@ ToolBar { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter font.pixelSize: app.extraSmallFont + color: app.headerForegroundColor } } } diff --git a/nymea-app/ui/components/GuhHeader.qml b/nymea-app/ui/components/GuhHeader.qml index 751025d1..1d090e55 100644 --- a/nymea-app/ui/components/GuhHeader.qml +++ b/nymea-app/ui/components/GuhHeader.qml @@ -41,6 +41,7 @@ ToolBar { font.pixelSize: app.mediumFont elide: Text.ElideRight text: root.text + color: app.headerForegroundColor } } } diff --git a/nymea-app/ui/components/MainPageTabButton.qml b/nymea-app/ui/components/MainPageTabButton.qml index a0d67798..b7aa8fe8 100644 --- a/nymea-app/ui/components/MainPageTabButton.qml +++ b/nymea-app/ui/components/MainPageTabButton.qml @@ -21,14 +21,14 @@ TabButton { Layout.preferredHeight: app.iconSize Layout.alignment: Qt.AlignHCenter name: root.iconSource - color: root.checked ? app.guhAccent : keyColor + color: root.checked ? app.accentColor : keyColor } Label { Layout.fillWidth: root.alignment === Qt.Vertical text: root.text horizontalAlignment: Text.AlignHCenter font.pixelSize: app.smallFont - color: root.checked ? app.guhAccent : Material.foreground + color: root.checked ? app.accentColor : Material.foreground } } } diff --git a/nymea-app/ui/components/MeaDialog.qml b/nymea-app/ui/components/MeaDialog.qml index 6e12bee4..00c21b2d 100644 --- a/nymea-app/ui/components/MeaDialog.qml +++ b/nymea-app/ui/components/MeaDialog.qml @@ -25,7 +25,7 @@ Dialog { id: headerColorIcon Layout.preferredHeight: app.iconSize * 2 Layout.preferredWidth: height - color: app.guhAccent + color: app.accentColor visible: name.length > 0 } @@ -35,7 +35,7 @@ Dialog { Layout.margins: app.margins wrapMode: Text.WrapAtWordBoundaryOrAnywhere text: root.title - color: app.guhAccent + color: app.accentColor font.pixelSize: app.largeFont } } diff --git a/nymea-app/ui/components/MeaListItemDelegate.qml b/nymea-app/ui/components/MeaListItemDelegate.qml index 2a1dc9b0..b97eda4c 100644 --- a/nymea-app/ui/components/MeaListItemDelegate.qml +++ b/nymea-app/ui/components/MeaListItemDelegate.qml @@ -11,7 +11,7 @@ SwipeDelegate { property string iconName property int iconSize: app.iconSize - property color iconColor: app.guhAccent + property color iconColor: app.accentColor property alias secondaryIconName: secondaryIcon.name property alias secondaryIconColor: secondaryIcon.color property alias tertiaryIconName: tertiaryIcon.name diff --git a/nymea-app/ui/components/ThinDivider.qml b/nymea-app/ui/components/ThinDivider.qml index 23d01722..d12de000 100644 --- a/nymea-app/ui/components/ThinDivider.qml +++ b/nymea-app/ui/components/ThinDivider.qml @@ -4,5 +4,5 @@ import QtQuick.Layouts 1.2 Rectangle { height: 1 Layout.fillWidth: true - color: app.guhAccent + color: app.accentColor } diff --git a/nymea-app/ui/customviews/ExtendedVolumeController.qml b/nymea-app/ui/customviews/ExtendedVolumeController.qml index 671c4322..420a2936 100644 --- a/nymea-app/ui/customviews/ExtendedVolumeController.qml +++ b/nymea-app/ui/customviews/ExtendedVolumeController.qml @@ -22,7 +22,7 @@ CustomViewBase { ColorIcon { anchors.fill: parent name: "../images/audio-speakers-muted-symbolic.svg" - color: parent.isMuted ? app.guhAccent : keyColor + color: parent.isMuted ? app.accentColor : keyColor } onClicked: { diff --git a/nymea-app/ui/customviews/GenericTypeLogView.qml b/nymea-app/ui/customviews/GenericTypeLogView.qml index 49ae9ebd..ac87052f 100644 --- a/nymea-app/ui/customviews/GenericTypeLogView.qml +++ b/nymea-app/ui/customviews/GenericTypeLogView.qml @@ -50,7 +50,7 @@ Item { Layout.preferredHeight: app.iconSize Layout.preferredWidth: height name: "../images/event.svg" - color: app.guhAccent + color: app.accentColor } ColumnLayout { @@ -80,7 +80,7 @@ Item { // for (var k = 0; k < eventDescriptor.paramDescriptors.count; k++) { // var paramDescriptor = eventDescriptor.paramDescriptors.get(k); // if (paramDescriptor.value === model.value) { -// return app.guhAccent; +// return app.accentColor; // } // } // } diff --git a/nymea-app/ui/devicepages/ColorLightDevicePage.qml b/nymea-app/ui/devicepages/ColorLightDevicePage.qml index 41317395..b3645e18 100644 --- a/nymea-app/ui/devicepages/ColorLightDevicePage.qml +++ b/nymea-app/ui/devicepages/ColorLightDevicePage.qml @@ -29,7 +29,7 @@ DevicePageBase { ColorIcon { anchors.fill: parent name: "../images/light-off.svg" - color: powerRow.powerState.value === true ? keyColor : app.guhAccent + color: powerRow.powerState.value === true ? keyColor : app.accentColor } onClicked: { var actionType = root.deviceClass.actionTypes.findByName("power"); @@ -63,7 +63,7 @@ DevicePageBase { ColorIcon { anchors.fill: parent name: "../images/light-on.svg" - color: powerRow.powerState.value === true ? app.guhAccent : keyColor + color: powerRow.powerState.value === true ? app.accentColor : keyColor } onClicked: { var actionType = root.deviceClass.actionTypes.findByName("power"); diff --git a/nymea-app/ui/devicepages/ConfigureThingPage.qml b/nymea-app/ui/devicepages/ConfigureThingPage.qml index b3ad8a8e..4427480f 100644 --- a/nymea-app/ui/devicepages/ConfigureThingPage.qml +++ b/nymea-app/ui/devicepages/ConfigureThingPage.qml @@ -69,7 +69,7 @@ Page { Layout.rightMargin: app.margins Layout.topMargin: app.margins text: qsTr("Thing parameters").toUpperCase() - color: app.guhAccent + color: app.accentColor } Repeater { diff --git a/nymea-app/ui/devicepages/GarageGateDevicePage.qml b/nymea-app/ui/devicepages/GarageGateDevicePage.qml index b0827fbf..18d10210 100644 --- a/nymea-app/ui/devicepages/GarageGateDevicePage.qml +++ b/nymea-app/ui/devicepages/GarageGateDevicePage.qml @@ -66,7 +66,7 @@ DevicePageBase { name: arrows.up ? "../images/up.svg" : "../images/down.svg" width: parent.width height: width - color: app.guhAccent + color: app.accentColor } } } diff --git a/nymea-app/ui/devicepages/StateLogPage.qml b/nymea-app/ui/devicepages/StateLogPage.qml index 3ad421ea..08dc3073 100644 --- a/nymea-app/ui/devicepages/StateLogPage.qml +++ b/nymea-app/ui/devicepages/StateLogPage.qml @@ -137,7 +137,7 @@ Page { Layout.fillWidth: true Layout.fillHeight: true mode: settings.graphStyle - color: app.guhAccent + color: app.accentColor Timer { id: updateTimer diff --git a/nymea-app/ui/magic/DeviceRulesPage.qml b/nymea-app/ui/magic/DeviceRulesPage.qml index 886ae985..e313de4c 100644 --- a/nymea-app/ui/magic/DeviceRulesPage.qml +++ b/nymea-app/ui/magic/DeviceRulesPage.qml @@ -99,7 +99,7 @@ Page { delegate: MeaListItemDelegate { width: parent.width iconName: "../images/magic.svg" - iconColor: !model.enabled ? "red" : (model.active ? app.guhAccent : "grey") + iconColor: !model.enabled ? "red" : (model.active ? app.accentColor : "grey") text: model.name canDelete: true @@ -137,7 +137,7 @@ Page { horizontalAlignment: Text.AlignHCenter text: qsTr("There's no magic involving %1.").arg(root.device.name) font.pixelSize: app.largeFont - color: app.guhAccent + color: app.accentColor } Label { width: parent.width diff --git a/nymea-app/ui/magic/EditRulePage.qml b/nymea-app/ui/magic/EditRulePage.qml index 125674d5..138e2f98 100644 --- a/nymea-app/ui/magic/EditRulePage.qml +++ b/nymea-app/ui/magic/EditRulePage.qml @@ -317,7 +317,7 @@ Page { width: height color: "transparent" border.width: 2 - border.color: modelData === root.ruleColor ? app.guhAccent : "transparent" + border.color: modelData === root.ruleColor ? app.accentColor : "transparent" anchors.centerIn: parent } @@ -347,7 +347,7 @@ Page { width: height color: "transparent" border.width: 2 - border.color: modelData === root.ruleIcon ? app.guhAccent : "transparent" + border.color: modelData === root.ruleIcon ? app.accentColor : "transparent" anchors.centerIn: parent } diff --git a/nymea-app/ui/magic/SimpleStateEvaluatorDelegate.qml b/nymea-app/ui/magic/SimpleStateEvaluatorDelegate.qml index a277ef23..237a5b8e 100644 --- a/nymea-app/ui/magic/SimpleStateEvaluatorDelegate.qml +++ b/nymea-app/ui/magic/SimpleStateEvaluatorDelegate.qml @@ -34,7 +34,7 @@ SwipeDelegate { Layout.preferredHeight: childEvaluatorsRepeater.count > 0 ? app.iconSize * .6 : app.iconSize Layout.preferredWidth: height name: root.stateEvaluator.stateDescriptor.interfaceName.length === 0 ? "../images/state.svg" : "../images/state-interface.svg" - color: app.guhAccent + color: app.accentColor } Label { @@ -97,7 +97,7 @@ SwipeDelegate { Layout.preferredHeight: app.iconSize * .6 Layout.preferredWidth: height name: childEvaluatorDelegate.stateDescriptor.interfaceName.length === 0 ? "../images/state.svg" : "../images/state-interface.svg" - color: app.guhAccent + color: app.accentColor } Label { font.pixelSize: app.smallFont diff --git a/nymea-app/ui/mainviews/DevicesPageDelegate.qml b/nymea-app/ui/mainviews/DevicesPageDelegate.qml index e7c0c91a..91143d00 100644 --- a/nymea-app/ui/mainviews/DevicesPageDelegate.qml +++ b/nymea-app/ui/mainviews/DevicesPageDelegate.qml @@ -9,7 +9,7 @@ MainPageTile { id: root text: interfaceToString(model.name).toUpperCase() iconName: interfaceToIcon(model.name) - iconColor: app.guhAccent + iconColor: app.accentColor disconnected: devicesSubProxyConnectables.count > 0 batteryCritical: devicesSubProxyBattery.count > 0 @@ -131,7 +131,7 @@ MainPageTile { id: icon width: app.iconSize height: width - color: app.guhAccent + color: app.accentColor name: { switch (model.name) { @@ -251,7 +251,7 @@ MainPageTile { Label { font.pixelSize: app.largeFont - color: app.guhAccent + color: app.accentColor Layout.fillWidth: true horizontalAlignment: Text.AlignRight text: { diff --git a/nymea-app/ui/mainviews/FavoritesView.qml b/nymea-app/ui/mainviews/FavoritesView.qml index 3ae73926..1a2cb5da 100644 --- a/nymea-app/ui/mainviews/FavoritesView.qml +++ b/nymea-app/ui/mainviews/FavoritesView.qml @@ -34,7 +34,7 @@ Item { height: gridView.cellHeight text: device.name.toUpperCase() iconName: app.interfacesToIcon(deviceClass.interfaces) - iconColor: app.guhAccent + iconColor: app.accentColor visible: !fakeDragItem.visible || fakeDragItem.deviceId !== device.id batteryCritical: batteryCriticalState && batteryCriticalState.value === true disconnected: connectedState && connectedState.value === false @@ -182,7 +182,7 @@ Item { padding: 0; topPadding: 0; bottomPadding: 0 contentItem: ColorIcon { name: "../images/light-off.svg" - color: app.guhAccent + color: app.accentColor } onClicked: { var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId); @@ -225,7 +225,7 @@ Item { padding: 0; topPadding: 0; bottomPadding: 0 contentItem: ColorIcon { name: "../images/light-on.svg" - color: app.guhAccent + color: app.accentColor } onClicked: { var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId); @@ -322,13 +322,13 @@ Item { horizontalAlignment: Text.AlignRight text: sensorsRoot.currentStateType.unitString font.pixelSize: app.smallFont - color: app.guhAccent + color: app.accentColor } Label { Layout.fillWidth: true horizontalAlignment: Text.AlignRight text: sensorsRoot.currentState.value// + " " + sensorsRoot.currentStateType.unitString - color: app.guhAccent + color: app.accentColor } } @@ -366,7 +366,7 @@ Item { padding: 0; topPadding: 0; bottomPadding: 0 contentItem: ColorIcon { name: "../images/up.svg" - color: app.guhAccent + color: app.accentColor } onClicked: { var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId); @@ -400,7 +400,7 @@ Item { padding: 0; topPadding: 0; bottomPadding: 0 contentItem: ColorIcon { name: "../images/down.svg" - color: app.guhAccent + color: app.accentColor } onClicked: { var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId); diff --git a/nymea-app/ui/mainviews/ScenesView.qml b/nymea-app/ui/mainviews/ScenesView.qml index b04f0819..024d6a41 100644 --- a/nymea-app/ui/mainviews/ScenesView.qml +++ b/nymea-app/ui/mainviews/ScenesView.qml @@ -31,7 +31,7 @@ Item { height: interfacesGridView.cellHeight iconName: iconTag ? "../images/" + iconTag.value + ".svg" : "../images/slideshow.svg"; fallbackIconName: "../images/slideshow.svg" - iconColor: colorTag ? colorTag.value : app.guhAccent; + iconColor: colorTag ? colorTag.value : app.accentColor; text: model.name.toUpperCase() property var colorTag: Engine.tagsManager.tags.findRuleTag(model.id, "color") diff --git a/nymea-app/ui/system/LogViewerPage.qml b/nymea-app/ui/system/LogViewerPage.qml index b0d577fb..ca40bb54 100644 --- a/nymea-app/ui/system/LogViewerPage.qml +++ b/nymea-app/ui/system/LogViewerPage.qml @@ -13,7 +13,7 @@ Page { HeaderButton { imageSource: "../images/go-down.svg" - color: root.autoScroll ? app.guhAccent : keyColor + color: root.autoScroll ? app.accentColor : keyColor onClicked: root.autoScroll = !root.autoScroll } }