diff --git a/mea/guh-logo.svg b/mea/guh-logo.svg index b2de99d5..bce91ead 100644 --- a/mea/guh-logo.svg +++ b/mea/guh-logo.svg @@ -9,8 +9,8 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="500" - height="500" + width="256" + height="256" id="svg2" version="1.1" inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" @@ -252,8 +252,8 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.979899" - inkscape:cx="30.679884" - inkscape:cy="202.52602" + inkscape:cx="-128.90044" + inkscape:cy="115.43739" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" @@ -261,7 +261,11 @@ inkscape:window-height="1698" inkscape:window-x="0" inkscape:window-y="44" - inkscape:window-maximized="1" /> + inkscape:window-maximized="1" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" /> @@ -270,7 +274,7 @@ image/svg+xml - + @@ -278,9 +282,9 @@ inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" - transform="translate(0,-552.36215)"> + transform="translate(-143.41788,-709.27353)"> diff --git a/mea/resources.qrc b/mea/resources.qrc index a3d76184..def3d19e 100644 --- a/mea/resources.qrc +++ b/mea/resources.qrc @@ -141,7 +141,6 @@ styles/light/ApplicationWindow.qml styles/light/Page.qml styles/dark/Page.qml - styles/marantec/ApplicationWindow.qml styles/maveo/ApplicationWindow.qml ui/BluetoothDiscoveryPage.qml ui/images/bluetooth.svg @@ -186,5 +185,7 @@ ui/images/shutter-0.svg ui/components/ShutterControls.qml ../LICENSE + ui/images/Built_with_Qt_RGB_logo.svg + ui/images/Built_with_Qt_RGB_logo_vertical.svg diff --git a/mea/styles/dark/ApplicationWindow.qml b/mea/styles/dark/ApplicationWindow.qml index adf7109c..183293fe 100644 --- a/mea/styles/dark/ApplicationWindow.qml +++ b/mea/styles/dark/ApplicationWindow.qml @@ -5,6 +5,7 @@ import QtQuick.Controls.Material 2.2 ApplicationWindow { property color guhAccent: "#ff57baae" property string systemName: "nymea" + property string appName: "mea" Material.theme: Material.Dark Material.accent: guhAccent diff --git a/mea/styles/light/ApplicationWindow.qml b/mea/styles/light/ApplicationWindow.qml index 76bb36f8..bc7fba6a 100644 --- a/mea/styles/light/ApplicationWindow.qml +++ b/mea/styles/light/ApplicationWindow.qml @@ -5,6 +5,7 @@ import QtQuick.Controls.Material 2.2 ApplicationWindow { property color guhAccent: "#ff57baae" property string systemName: "nymea" + property string appName: "mea" Material.theme: Material.Light Material.accent: guhAccent diff --git a/mea/styles/marantec/ApplicationWindow.qml b/mea/styles/marantec/ApplicationWindow.qml deleted file mode 100644 index 47eb7e86..00000000 --- a/mea/styles/marantec/ApplicationWindow.qml +++ /dev/null @@ -1,12 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Templates 2.2 -import QtQuick.Controls.Material 2.2 - -ApplicationWindow { - property color guhAccent: "red" - property string systemName: "nymea" - - Material.theme: Material.Light - Material.accent: guhAccent - Material.primary: "red" -} diff --git a/mea/styles/maveo/ApplicationWindow.qml b/mea/styles/maveo/ApplicationWindow.qml index b68d836f..49ed0de4 100644 --- a/mea/styles/maveo/ApplicationWindow.qml +++ b/mea/styles/maveo/ApplicationWindow.qml @@ -5,8 +5,7 @@ import QtQuick.Controls.Material 2.2 ApplicationWindow { property color guhAccent: "#ffcc00" property string systemName: "maveo" - - title: qsTr("Maveo Pro Box Dashboard") + property string appName: qsTr("Maveo Pro Box Dashboard") Material.theme: Material.Light Material.accent: guhAccent diff --git a/mea/ui/AboutPage.qml b/mea/ui/AboutPage.qml index d59619d1..feeb077d 100644 --- a/mea/ui/AboutPage.qml +++ b/mea/ui/AboutPage.qml @@ -8,66 +8,193 @@ import "components" Page { id: root header: GuhHeader { - text: qsTr("About %1").arg(app.systemName) + text: qsTr("About %1").arg(app.appName) backButtonVisible: true onBackPressed: pageStack.pop() } - ColumnLayout { + Flickable { anchors.fill: parent - spacing: app.margins + contentHeight: aboutColumn.implicitHeight - Image { - Layout.preferredHeight: app.iconSize * 4 - Layout.fillWidth: true - fillMode: Image.PreserveAspectFit - horizontalAlignment: Image.AlignHCenter - source: "../guh-logo.svg" - } + ColumnLayout { + id: aboutColumn + width: parent.width - ThinDivider {} + RowLayout { + Layout.fillWidth: true + Layout.margins: app.margins + spacing: app.margins - GridLayout { - Layout.fillWidth: true - Layout.margins: app.margins - columns: 2 + Image { + Layout.preferredHeight: app.iconSize * 2 + Layout.preferredWidth: height + fillMode: Image.PreserveAspectFit + source: "../guh-logo.svg" + } + + GridLayout { + Layout.fillWidth: true + columns: 2 + + Label { + text: qsTr("App version:") + } + Label { + text: appVersion + } + Label { + text: qsTr("Qt version:") + } + Label { + text: qtVersion + } + } + } + + ThinDivider {} Label { - text: qsTr("App version:") - } - Label { - text: appVersion - } - Label { - text: qsTr("Qt version:") - } - Label { - text: qtVersion - } - } - - ThinDivider { } - - Flickable { - Layout.fillHeight: true - Layout.fillWidth: true - contentHeight: licenseText.implicitHeight - clip: true - ScrollBar.vertical: ScrollBar {} - TextArea { - id: licenseText + Layout.fillWidth: true + Layout.topMargin: app.margins + Layout.leftMargin: app.margins + Layout.rightMargin: app.margins wrapMode: Text.WordWrap - font.pixelSize: app.smallFont - anchors { left: parent.left; right: parent.right; margins: app.margins } - Component.onCompleted: { - var xhr = new XMLHttpRequest; - xhr.open("GET", "../../LICENSE"); - xhr.onreadystatechange = function() { - if (xhr.readyState === XMLHttpRequest.DONE) { - text = xhr.responseText.replace(/(^\ *)/gm, "").replace(/(\n\n)/gm,"\t").replace(/(\n)/gm, " ").replace(/(\t)/gm, "\n\n"); + font.bold: true + text: "Copyright (C) 2018 guh GmbH" + } + + Label { + Layout.fillWidth: true + Layout.leftMargin: app.margins + Layout.rightMargin: app.margins + wrapMode: Text.WordWrap + text: qsTr("nymea is a registered trademark of guh GmbH.") + } + + Label { + Layout.fillWidth: true + Layout.leftMargin: app.margins + Layout.rightMargin: app.margins + wrapMode: Text.WordWrap + text: qsTr("Licensed under the terms of the GNU general public license, version 2. Please visit the GitHub page for source code and build instructions.") + } + + ColumnLayout { + Layout.fillWidth: true + ItemDelegate { + Layout.fillWidth: true + + contentItem: RowLayout { + Label { + Layout.fillWidth: true + text: qsTr("View license text") } - }; - xhr.send(); + Image { + source: "images/next.svg" + Layout.preferredHeight: parent.height + Layout.preferredWidth: height + } + } + + onClicked: { + pageStack.push(licenseTextComponent) + } + } + + ItemDelegate { + Layout.fillWidth: true + + contentItem: RowLayout { + Label { + Layout.fillWidth: true + text: qsTr("Visit GitHub page") + } + Image { + source: "images/next.svg" + Layout.preferredHeight: parent.height + Layout.preferredWidth: height + } + } + onClicked: { + Qt.openUrlExternally("https://github.com/guh/mea") + } + } + } + + + ThinDivider { } + + RowLayout { + Layout.fillWidth: true + Layout.margins: app.margins + spacing: app.margins + + Image { + Layout.preferredHeight: app.iconSize * 2 + Layout.preferredWidth: height + fillMode: Image.PreserveAspectFit + source: "images/Built_with_Qt_RGB_logo_vertical.svg" + sourceSize.width: app.iconSize * 2 + sourceSize.height: app.iconSize * 2 + } + + Label { + Layout.fillWidth: true + text: qsTr("Qt is a registered trademark of The Qt Company Ltd. and its subsidiaries.") + wrapMode: Text.WordWrap + } + } + ItemDelegate { + Layout.fillWidth: true + + contentItem: RowLayout { + Label { + Layout.fillWidth: true + text: qsTr("Visit the Qt website") + } + Image { + source: "images/next.svg" + Layout.preferredHeight: parent.height + Layout.preferredWidth: height + } + } + + onClicked: { + Qt.openUrlExternally("https://qt.io") + } + } + } + } + + + Component { + id: licenseTextComponent + Page { + header: GuhHeader { + text: qsTr("License text") + onBackPressed: pageStack.pop() + } + Flickable { + anchors.fill: parent + contentHeight: licenseText.implicitHeight + clip: true + ScrollBar.vertical: ScrollBar {} + TextArea { + id: licenseText + wrapMode: Text.WordWrap + font.pixelSize: app.smallFont + anchors { left: parent.left; right: parent.right; margins: app.margins } + Component.onCompleted: { + var xhr = new XMLHttpRequest; + xhr.open("GET", "../../LICENSE"); + xhr.onreadystatechange = function() { + if (xhr.readyState === XMLHttpRequest.DONE) { + text = xhr.responseText.replace(/(^\ *)/gm, "").replace(/(\n\n)/gm,"\t").replace(/(\n)/gm, " ").replace(/(\t)/gm, "\n\n"); + } + }; + xhr.send(); + } } } } diff --git a/mea/ui/AppSettingsPage.qml b/mea/ui/AppSettingsPage.qml index 94b2a32a..9dec1e83 100644 --- a/mea/ui/AppSettingsPage.qml +++ b/mea/ui/AppSettingsPage.qml @@ -116,7 +116,7 @@ Page { contentItem: RowLayout { Label { Layout.fillWidth: true - text: qsTr("About %1").arg(app.systemName) + text: qsTr("About %1").arg(app.appName) } Image { source: "images/next.svg" diff --git a/mea/ui/Mea.qml b/mea/ui/Mea.qml index 2b82c117..6c59e052 100644 --- a/mea/ui/Mea.qml +++ b/mea/ui/Mea.qml @@ -12,6 +12,7 @@ ApplicationWindow { height: 580 visibility: settings.viewMode font: Qt.application.font + title: appName property int margins: 14 property int bigMargins: 20 diff --git a/mea/ui/images/Built_with_Qt_RGB_logo.svg b/mea/ui/images/Built_with_Qt_RGB_logo.svg new file mode 100644 index 00000000..e4235027 --- /dev/null +++ b/mea/ui/images/Built_with_Qt_RGB_logo.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/mea/ui/images/Built_with_Qt_RGB_logo_vertical.svg b/mea/ui/images/Built_with_Qt_RGB_logo_vertical.svg new file mode 100644 index 00000000..df5cf0a4 --- /dev/null +++ b/mea/ui/images/Built_with_Qt_RGB_logo_vertical.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + +