better styling
This commit is contained in:
parent
04b5e1931b
commit
5f9fb02e32
@ -3,16 +3,33 @@ import QtQuick.Templates 2.2
|
|||||||
import QtQuick.Controls.Material 2.2
|
import QtQuick.Controls.Material 2.2
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
property color guhAccent: "#ff57baae"
|
Material.theme: Material.Dark
|
||||||
|
|
||||||
|
// The system (box) name.
|
||||||
property string systemName: "nymea"
|
property string systemName: "nymea"
|
||||||
|
|
||||||
|
// The app name
|
||||||
property string appName: "nymea:app"
|
property string appName: "nymea:app"
|
||||||
|
|
||||||
Material.theme: Material.Dark
|
// The header background color
|
||||||
Material.accent: guhAccent
|
property color primaryColor: Material.background
|
||||||
Material.primary: Material.background
|
|
||||||
|
|
||||||
function interfaceToColor(name) {
|
// Header font color
|
||||||
return "khaki"
|
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"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,12 +3,31 @@ import QtQuick.Templates 2.2
|
|||||||
import QtQuick.Controls.Material 2.2
|
import QtQuick.Controls.Material 2.2
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
property color guhAccent: "#ff57baae"
|
// The system (box) name.
|
||||||
property string systemName: "nymea"
|
property string systemName: "nymea"
|
||||||
|
|
||||||
|
// The app name
|
||||||
property string appName: "nymea:app"
|
property string appName: "nymea:app"
|
||||||
|
|
||||||
Material.theme: Material.Light
|
// The header background color
|
||||||
Material.accent: guhAccent
|
property color primaryColor: "white"
|
||||||
Material.primary: "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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -196,7 +196,7 @@ Page {
|
|||||||
}
|
}
|
||||||
progressive: true
|
progressive: true
|
||||||
secondaryIconName: "../images/network-secure.svg"
|
secondaryIconName: "../images/network-secure.svg"
|
||||||
secondaryIconColor: isTrusted ? app.guhAccent : Material.foreground
|
secondaryIconColor: isTrusted ? app.accentColor : Material.foreground
|
||||||
swipe.enabled: discoveryDeviceDelegate.discoveryDevice.deviceType === DiscoveryDevice.DeviceTypeNetwork
|
swipe.enabled: discoveryDeviceDelegate.discoveryDevice.deviceType === DiscoveryDevice.DeviceTypeNetwork
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@ -361,7 +361,7 @@ Page {
|
|||||||
Layout.preferredHeight: app.iconSize * 2
|
Layout.preferredHeight: app.iconSize * 2
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
name: certDialog.hasOldFingerprint ? "../images/lock-broken.svg" : "../images/info.svg"
|
name: certDialog.hasOldFingerprint ? "../images/lock-broken.svg" : "../images/info.svg"
|
||||||
color: certDialog.hasOldFingerprint ? "red" : app.guhAccent
|
color: certDialog.hasOldFingerprint ? "red" : app.accentColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@ -369,7 +369,7 @@ Page {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: certDialog.hasOldFingerprint ? qsTr("Warning") : qsTr("Hi there!")
|
text: certDialog.hasOldFingerprint ? qsTr("Warning") : qsTr("Hi there!")
|
||||||
color: certDialog.hasOldFingerprint ? "red" : app.guhAccent
|
color: certDialog.hasOldFingerprint ? "red" : app.accentColor
|
||||||
font.pixelSize: app.largeFont
|
font.pixelSize: app.largeFont
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -468,7 +468,7 @@ Page {
|
|||||||
Layout.preferredHeight: app.iconSize * 2
|
Layout.preferredHeight: app.iconSize * 2
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
name: "../images/info.svg"
|
name: "../images/info.svg"
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@ -476,7 +476,7 @@ Page {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
text: dialog.title
|
text: dialog.title
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
font.pixelSize: app.largeFont
|
font.pixelSize: app.largeFont
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -557,7 +557,7 @@ Page {
|
|||||||
visible: model.sslEnabled
|
visible: model.sslEnabled
|
||||||
name: "../images/network-secure.svg"
|
name: "../images/network-secure.svg"
|
||||||
property bool isTrusted: Engine.connection.isTrusted(dialog.discoveryDevice.toUrl(index))
|
property bool isTrusted: Engine.connection.isTrusted(dialog.discoveryDevice.toUrl(index))
|
||||||
color: isTrusted ? app.guhAccent : keyColor
|
color: isTrusted ? app.accentColor : keyColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|||||||
@ -108,7 +108,7 @@ Page {
|
|||||||
: qsTr("The passwords don't match.")
|
: qsTr("The passwords don't match.")
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
Layout.preferredHeight: confirmPasswordTextField.height * 2
|
Layout.preferredHeight: confirmPasswordTextField.height * 2
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
|||||||
@ -78,7 +78,7 @@ Page {
|
|||||||
id: ruleDelegate
|
id: ruleDelegate
|
||||||
width: parent.width
|
width: parent.width
|
||||||
iconName: "../images/" + (model.executable ? (iconTag ? iconTag.value : "slideshow") : "magic") + ".svg"
|
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
|
text: model.name
|
||||||
canDelete: true
|
canDelete: true
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import QtQuick 2.8
|
import QtQuick 2.8
|
||||||
import QtQuick.Controls 2.1
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Controls.Material 2.1
|
import QtQuick.Controls.Material 2.1
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
@ -13,7 +13,12 @@ ApplicationWindow {
|
|||||||
height: 580
|
height: 580
|
||||||
visibility: ApplicationWindow.AutomaticVisibility
|
visibility: ApplicationWindow.AutomaticVisibility
|
||||||
font: Qt.application.font
|
font: Qt.application.font
|
||||||
|
|
||||||
|
// Those variables must be present in the Style
|
||||||
title: appName
|
title: appName
|
||||||
|
Material.primary: primaryColor
|
||||||
|
Material.accent: accentColor
|
||||||
|
Material.foreground: foregroundColor
|
||||||
|
|
||||||
property int margins: 14
|
property int margins: 14
|
||||||
property int bigMargins: 20
|
property int bigMargins: 20
|
||||||
@ -24,9 +29,9 @@ ApplicationWindow {
|
|||||||
property int iconSize: 30
|
property int iconSize: 30
|
||||||
property int delegateHeight: 60
|
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 string lastConnectedHost: ""
|
||||||
property alias viewMode: app.visibility
|
property alias viewMode: app.visibility
|
||||||
property bool returnToHome: false
|
property bool returnToHome: false
|
||||||
@ -258,21 +263,25 @@ ApplicationWindow {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property var fallbackColors: {
|
||||||
|
"temperaturesensor": "red",
|
||||||
|
"humiditysensor": "deepskyblue",
|
||||||
|
"moisturesensor":"blue",
|
||||||
|
"lightsensor": "orange",
|
||||||
|
"conductivitysensor": "green",
|
||||||
|
"pressuresensor": "grey"
|
||||||
|
}
|
||||||
|
|
||||||
function interfaceToColor(name) {
|
function interfaceToColor(name) {
|
||||||
switch (name) {
|
// Try to load color map from style
|
||||||
case "temperaturesensor":
|
if (interfaceColors[name]) {
|
||||||
return "red";
|
return interfaceColors[name];
|
||||||
case "humiditysensor":
|
|
||||||
return "deepskyblue";
|
|
||||||
case "moisturesensor":
|
|
||||||
return "blue";
|
|
||||||
case "lightsensor":
|
|
||||||
return "orange";
|
|
||||||
case "conductivitysensor":
|
|
||||||
return "green";
|
|
||||||
case "pressuresensor":
|
|
||||||
return "grey";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fallbackColors[name]) {
|
||||||
|
return fallbackColors[name];
|
||||||
|
}
|
||||||
|
|
||||||
return "grey";
|
return "grey";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -42,12 +42,12 @@ Page {
|
|||||||
ColorIcon {
|
ColorIcon {
|
||||||
height: app.iconSize * 2
|
height: app.iconSize * 2
|
||||||
width: height
|
width: height
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
name: "../images/info.svg"
|
name: "../images/info.svg"
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
text: qsTr("Authentication required")
|
text: qsTr("Authentication required")
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@ -149,7 +149,7 @@ Page {
|
|||||||
return getWirelessStatusString()
|
return getWirelessStatusString()
|
||||||
}
|
}
|
||||||
|
|
||||||
iconColor: model.selectedNetwork ? app.guhAccent : "#808080"
|
iconColor: model.selectedNetwork ? app.accentColor : "#808080"
|
||||||
iconName: {
|
iconName: {
|
||||||
if (model.protected) {
|
if (model.protected) {
|
||||||
if (model.signalStrength <= 25)
|
if (model.signalStrength <= 25)
|
||||||
@ -316,7 +316,7 @@ Page {
|
|||||||
Layout.preferredHeight: app.iconSize
|
Layout.preferredHeight: app.iconSize
|
||||||
Layout.preferredWidth: app.iconSize
|
Layout.preferredWidth: app.iconSize
|
||||||
name: "../images/eye.svg"
|
name: "../images/eye.svg"
|
||||||
color: passwordTextField.echoMode === TextInput.Normal ? app.guhAccent : keyColor
|
color: passwordTextField.echoMode === TextInput.Normal ? app.accentColor : keyColor
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: -app.margins / 2
|
anchors.margins: -app.margins / 2
|
||||||
|
|||||||
@ -21,7 +21,7 @@ ColumnLayout {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
id: textLabel
|
id: textLabel
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
|
import QtQuick.Controls.Material 2.1
|
||||||
|
|
||||||
ToolBar {
|
ToolBar {
|
||||||
id: root
|
id: root
|
||||||
@ -33,6 +34,7 @@ ToolBar {
|
|||||||
font.pixelSize: app.mediumFont
|
font.pixelSize: app.mediumFont
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: root.title
|
text: root.title
|
||||||
|
color: app.headerForegroundColor
|
||||||
}
|
}
|
||||||
|
|
||||||
HeaderButton {
|
HeaderButton {
|
||||||
@ -58,6 +60,7 @@ ToolBar {
|
|||||||
font.pixelSize: app.mediumFont
|
font.pixelSize: app.mediumFont
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: qsTr("menu")
|
text: qsTr("menu")
|
||||||
|
color: app.headerForegroundColor
|
||||||
}
|
}
|
||||||
|
|
||||||
HeaderButton {
|
HeaderButton {
|
||||||
@ -96,7 +99,7 @@ ToolBar {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: app.margins / 2
|
anchors.margins: app.margins / 2
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: app.guhAccent
|
border.color: app.accentColor
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@ -116,6 +119,7 @@ ToolBar {
|
|||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
font.pixelSize: app.extraSmallFont
|
font.pixelSize: app.extraSmallFont
|
||||||
|
color: app.headerForegroundColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,6 +41,7 @@ ToolBar {
|
|||||||
font.pixelSize: app.mediumFont
|
font.pixelSize: app.mediumFont
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: root.text
|
text: root.text
|
||||||
|
color: app.headerForegroundColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,14 +21,14 @@ TabButton {
|
|||||||
Layout.preferredHeight: app.iconSize
|
Layout.preferredHeight: app.iconSize
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
name: root.iconSource
|
name: root.iconSource
|
||||||
color: root.checked ? app.guhAccent : keyColor
|
color: root.checked ? app.accentColor : keyColor
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: root.alignment === Qt.Vertical
|
Layout.fillWidth: root.alignment === Qt.Vertical
|
||||||
text: root.text
|
text: root.text
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
font.pixelSize: app.smallFont
|
font.pixelSize: app.smallFont
|
||||||
color: root.checked ? app.guhAccent : Material.foreground
|
color: root.checked ? app.accentColor : Material.foreground
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@ Dialog {
|
|||||||
id: headerColorIcon
|
id: headerColorIcon
|
||||||
Layout.preferredHeight: app.iconSize * 2
|
Layout.preferredHeight: app.iconSize * 2
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
visible: name.length > 0
|
visible: name.length > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ Dialog {
|
|||||||
Layout.margins: app.margins
|
Layout.margins: app.margins
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
text: root.title
|
text: root.title
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
font.pixelSize: app.largeFont
|
font.pixelSize: app.largeFont
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@ SwipeDelegate {
|
|||||||
|
|
||||||
property string iconName
|
property string iconName
|
||||||
property int iconSize: app.iconSize
|
property int iconSize: app.iconSize
|
||||||
property color iconColor: app.guhAccent
|
property color iconColor: app.accentColor
|
||||||
property alias secondaryIconName: secondaryIcon.name
|
property alias secondaryIconName: secondaryIcon.name
|
||||||
property alias secondaryIconColor: secondaryIcon.color
|
property alias secondaryIconColor: secondaryIcon.color
|
||||||
property alias tertiaryIconName: tertiaryIcon.name
|
property alias tertiaryIconName: tertiaryIcon.name
|
||||||
|
|||||||
@ -4,5 +4,5 @@ import QtQuick.Layouts 1.2
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
height: 1
|
height: 1
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ CustomViewBase {
|
|||||||
ColorIcon {
|
ColorIcon {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
name: "../images/audio-speakers-muted-symbolic.svg"
|
name: "../images/audio-speakers-muted-symbolic.svg"
|
||||||
color: parent.isMuted ? app.guhAccent : keyColor
|
color: parent.isMuted ? app.accentColor : keyColor
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|||||||
@ -50,7 +50,7 @@ Item {
|
|||||||
Layout.preferredHeight: app.iconSize
|
Layout.preferredHeight: app.iconSize
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
name: "../images/event.svg"
|
name: "../images/event.svg"
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@ -80,7 +80,7 @@ Item {
|
|||||||
// for (var k = 0; k < eventDescriptor.paramDescriptors.count; k++) {
|
// for (var k = 0; k < eventDescriptor.paramDescriptors.count; k++) {
|
||||||
// var paramDescriptor = eventDescriptor.paramDescriptors.get(k);
|
// var paramDescriptor = eventDescriptor.paramDescriptors.get(k);
|
||||||
// if (paramDescriptor.value === model.value) {
|
// if (paramDescriptor.value === model.value) {
|
||||||
// return app.guhAccent;
|
// return app.accentColor;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|||||||
@ -29,7 +29,7 @@ DevicePageBase {
|
|||||||
ColorIcon {
|
ColorIcon {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
name: "../images/light-off.svg"
|
name: "../images/light-off.svg"
|
||||||
color: powerRow.powerState.value === true ? keyColor : app.guhAccent
|
color: powerRow.powerState.value === true ? keyColor : app.accentColor
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var actionType = root.deviceClass.actionTypes.findByName("power");
|
var actionType = root.deviceClass.actionTypes.findByName("power");
|
||||||
@ -63,7 +63,7 @@ DevicePageBase {
|
|||||||
ColorIcon {
|
ColorIcon {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
name: "../images/light-on.svg"
|
name: "../images/light-on.svg"
|
||||||
color: powerRow.powerState.value === true ? app.guhAccent : keyColor
|
color: powerRow.powerState.value === true ? app.accentColor : keyColor
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var actionType = root.deviceClass.actionTypes.findByName("power");
|
var actionType = root.deviceClass.actionTypes.findByName("power");
|
||||||
|
|||||||
@ -69,7 +69,7 @@ Page {
|
|||||||
Layout.rightMargin: app.margins
|
Layout.rightMargin: app.margins
|
||||||
Layout.topMargin: app.margins
|
Layout.topMargin: app.margins
|
||||||
text: qsTr("Thing parameters").toUpperCase()
|
text: qsTr("Thing parameters").toUpperCase()
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|||||||
@ -66,7 +66,7 @@ DevicePageBase {
|
|||||||
name: arrows.up ? "../images/up.svg" : "../images/down.svg"
|
name: arrows.up ? "../images/up.svg" : "../images/down.svg"
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: width
|
height: width
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -137,7 +137,7 @@ Page {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
mode: settings.graphStyle
|
mode: settings.graphStyle
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: updateTimer
|
id: updateTimer
|
||||||
|
|||||||
@ -99,7 +99,7 @@ Page {
|
|||||||
delegate: MeaListItemDelegate {
|
delegate: MeaListItemDelegate {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
iconName: "../images/magic.svg"
|
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
|
text: model.name
|
||||||
canDelete: true
|
canDelete: true
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ Page {
|
|||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: qsTr("There's no magic involving %1.").arg(root.device.name)
|
text: qsTr("There's no magic involving %1.").arg(root.device.name)
|
||||||
font.pixelSize: app.largeFont
|
font.pixelSize: app.largeFont
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|||||||
@ -317,7 +317,7 @@ Page {
|
|||||||
width: height
|
width: height
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
border.width: 2
|
border.width: 2
|
||||||
border.color: modelData === root.ruleColor ? app.guhAccent : "transparent"
|
border.color: modelData === root.ruleColor ? app.accentColor : "transparent"
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,7 +347,7 @@ Page {
|
|||||||
width: height
|
width: height
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
border.width: 2
|
border.width: 2
|
||||||
border.color: modelData === root.ruleIcon ? app.guhAccent : "transparent"
|
border.color: modelData === root.ruleIcon ? app.accentColor : "transparent"
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ SwipeDelegate {
|
|||||||
Layout.preferredHeight: childEvaluatorsRepeater.count > 0 ? app.iconSize * .6 : app.iconSize
|
Layout.preferredHeight: childEvaluatorsRepeater.count > 0 ? app.iconSize * .6 : app.iconSize
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
name: root.stateEvaluator.stateDescriptor.interfaceName.length === 0 ? "../images/state.svg" : "../images/state-interface.svg"
|
name: root.stateEvaluator.stateDescriptor.interfaceName.length === 0 ? "../images/state.svg" : "../images/state-interface.svg"
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@ -97,7 +97,7 @@ SwipeDelegate {
|
|||||||
Layout.preferredHeight: app.iconSize * .6
|
Layout.preferredHeight: app.iconSize * .6
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
name: childEvaluatorDelegate.stateDescriptor.interfaceName.length === 0 ? "../images/state.svg" : "../images/state-interface.svg"
|
name: childEvaluatorDelegate.stateDescriptor.interfaceName.length === 0 ? "../images/state.svg" : "../images/state-interface.svg"
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
font.pixelSize: app.smallFont
|
font.pixelSize: app.smallFont
|
||||||
|
|||||||
@ -9,7 +9,7 @@ MainPageTile {
|
|||||||
id: root
|
id: root
|
||||||
text: interfaceToString(model.name).toUpperCase()
|
text: interfaceToString(model.name).toUpperCase()
|
||||||
iconName: interfaceToIcon(model.name)
|
iconName: interfaceToIcon(model.name)
|
||||||
iconColor: app.guhAccent
|
iconColor: app.accentColor
|
||||||
disconnected: devicesSubProxyConnectables.count > 0
|
disconnected: devicesSubProxyConnectables.count > 0
|
||||||
batteryCritical: devicesSubProxyBattery.count > 0
|
batteryCritical: devicesSubProxyBattery.count > 0
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ MainPageTile {
|
|||||||
id: icon
|
id: icon
|
||||||
width: app.iconSize
|
width: app.iconSize
|
||||||
height: width
|
height: width
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
|
|
||||||
name: {
|
name: {
|
||||||
switch (model.name) {
|
switch (model.name) {
|
||||||
@ -251,7 +251,7 @@ MainPageTile {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
font.pixelSize: app.largeFont
|
font.pixelSize: app.largeFont
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignRight
|
horizontalAlignment: Text.AlignRight
|
||||||
text: {
|
text: {
|
||||||
|
|||||||
@ -34,7 +34,7 @@ Item {
|
|||||||
height: gridView.cellHeight
|
height: gridView.cellHeight
|
||||||
text: device.name.toUpperCase()
|
text: device.name.toUpperCase()
|
||||||
iconName: app.interfacesToIcon(deviceClass.interfaces)
|
iconName: app.interfacesToIcon(deviceClass.interfaces)
|
||||||
iconColor: app.guhAccent
|
iconColor: app.accentColor
|
||||||
visible: !fakeDragItem.visible || fakeDragItem.deviceId !== device.id
|
visible: !fakeDragItem.visible || fakeDragItem.deviceId !== device.id
|
||||||
batteryCritical: batteryCriticalState && batteryCriticalState.value === true
|
batteryCritical: batteryCriticalState && batteryCriticalState.value === true
|
||||||
disconnected: connectedState && connectedState.value === false
|
disconnected: connectedState && connectedState.value === false
|
||||||
@ -182,7 +182,7 @@ Item {
|
|||||||
padding: 0; topPadding: 0; bottomPadding: 0
|
padding: 0; topPadding: 0; bottomPadding: 0
|
||||||
contentItem: ColorIcon {
|
contentItem: ColorIcon {
|
||||||
name: "../images/light-off.svg"
|
name: "../images/light-off.svg"
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId);
|
var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId);
|
||||||
@ -225,7 +225,7 @@ Item {
|
|||||||
padding: 0; topPadding: 0; bottomPadding: 0
|
padding: 0; topPadding: 0; bottomPadding: 0
|
||||||
contentItem: ColorIcon {
|
contentItem: ColorIcon {
|
||||||
name: "../images/light-on.svg"
|
name: "../images/light-on.svg"
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId);
|
var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId);
|
||||||
@ -322,13 +322,13 @@ Item {
|
|||||||
horizontalAlignment: Text.AlignRight
|
horizontalAlignment: Text.AlignRight
|
||||||
text: sensorsRoot.currentStateType.unitString
|
text: sensorsRoot.currentStateType.unitString
|
||||||
font.pixelSize: app.smallFont
|
font.pixelSize: app.smallFont
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignRight
|
horizontalAlignment: Text.AlignRight
|
||||||
text: sensorsRoot.currentState.value// + " " + sensorsRoot.currentStateType.unitString
|
text: sensorsRoot.currentState.value// + " " + sensorsRoot.currentStateType.unitString
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,7 +366,7 @@ Item {
|
|||||||
padding: 0; topPadding: 0; bottomPadding: 0
|
padding: 0; topPadding: 0; bottomPadding: 0
|
||||||
contentItem: ColorIcon {
|
contentItem: ColorIcon {
|
||||||
name: "../images/up.svg"
|
name: "../images/up.svg"
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId);
|
var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId);
|
||||||
@ -400,7 +400,7 @@ Item {
|
|||||||
padding: 0; topPadding: 0; bottomPadding: 0
|
padding: 0; topPadding: 0; bottomPadding: 0
|
||||||
contentItem: ColorIcon {
|
contentItem: ColorIcon {
|
||||||
name: "../images/down.svg"
|
name: "../images/down.svg"
|
||||||
color: app.guhAccent
|
color: app.accentColor
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId);
|
var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId);
|
||||||
|
|||||||
@ -31,7 +31,7 @@ Item {
|
|||||||
height: interfacesGridView.cellHeight
|
height: interfacesGridView.cellHeight
|
||||||
iconName: iconTag ? "../images/" + iconTag.value + ".svg" : "../images/slideshow.svg";
|
iconName: iconTag ? "../images/" + iconTag.value + ".svg" : "../images/slideshow.svg";
|
||||||
fallbackIconName: "../images/slideshow.svg"
|
fallbackIconName: "../images/slideshow.svg"
|
||||||
iconColor: colorTag ? colorTag.value : app.guhAccent;
|
iconColor: colorTag ? colorTag.value : app.accentColor;
|
||||||
text: model.name.toUpperCase()
|
text: model.name.toUpperCase()
|
||||||
|
|
||||||
property var colorTag: Engine.tagsManager.tags.findRuleTag(model.id, "color")
|
property var colorTag: Engine.tagsManager.tags.findRuleTag(model.id, "color")
|
||||||
|
|||||||
@ -13,7 +13,7 @@ Page {
|
|||||||
|
|
||||||
HeaderButton {
|
HeaderButton {
|
||||||
imageSource: "../images/go-down.svg"
|
imageSource: "../images/go-down.svg"
|
||||||
color: root.autoScroll ? app.guhAccent : keyColor
|
color: root.autoScroll ? app.accentColor : keyColor
|
||||||
onClicked: root.autoScroll = !root.autoScroll
|
onClicked: root.autoScroll = !root.autoScroll
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user