aboutsummaryrefslogtreecommitdiff
path: root/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'main.qml')
-rw-r--r--main.qml209
1 files changed, 61 insertions, 148 deletions
diff --git a/main.qml b/main.qml
index 80a9eca..d653056 100644
--- a/main.qml
+++ b/main.qml
@@ -1,14 +1,11 @@
import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Extras 1.4
-import QtQuick.Controls 2.3
-import QtQuick.Dialogs 1.1
-import QtQuick.Controls.Material 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Dialogs 1.2
+import QtQuick.Controls.Material 2.3
ApplicationWindow {
- Material.theme: Material.Dark
- Material.accent: Material.Blue
-
property int normal_width: 700
property int normal_height: 400
@@ -49,10 +46,10 @@ ApplicationWindow {
id: start_support_button
objectName: "start_support_button"
text: qsTr("Start remote support session")
- anchors.topMargin: parent.height * 0.025
- anchors.left: pin_group.left
- anchors.leftMargin: 0
- anchors.top: pin_group.bottom
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 15
+ anchors.right: parent.right
+ anchors.rightMargin: 15
checkable: true
onClicked: mainqmladaptor.handleConnectButtonClick(checked);
@@ -113,35 +110,38 @@ ApplicationWindow {
enabled: false
anchors.left: parent.left
anchors.leftMargin: 15
- wrapMode: Text.WordWrap
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
anchors.verticalCenterOffset: 0
anchors.verticalCenter: parent.verticalCenter
}
Label {
id: dbus_api_status_text
+ y: 350
+ width: parent.width / 2
+ height: 22
+ text: "Unknown state of Service"
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ verticalAlignment: Text.AlignVCenter
+ font.pointSize: 11
+ fontSizeMode: Text.Fit
+ anchors.leftMargin: 15 + dbus_api_status_indicator.width + 5
objectName: "dbus_api_status_text"
- text: qsTr("Unknown state of service")
- font.family: "Verdana"
anchors.bottom: parent.bottom
anchors.bottomMargin: 15
anchors.left: parent.left
- anchors.leftMargin: 15
- font.pixelSize: 12
- }
- StatusIndicator {
- id: dbus_api_status_indicator
- objectName: "dbus_api_status_indicator"
- width: 15
- height: 15
- color: "#73d216"
- anchors.bottom: dbus_api_status_text.bottom
- anchors.bottomMargin: 0
- anchors.left: dbus_api_status_text.right
- anchors.leftMargin: 5
- visible: true
- active: false
+ StatusIndicator {
+ id: dbus_api_status_indicator
+ width: height
+ height: parent.height
+ objectName: "dbus_api_status_indicator"
+ color: "#73d216"
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.left
+ anchors.rightMargin: 5
+ active: false
+ }
}
Item {
@@ -156,17 +156,6 @@ ApplicationWindow {
anchors.right: parent.right
anchors.rightMargin: 0
- Rectangle {
- id: your_url_seperator
- x: 47
- y: 39
- width: 320
- height: 1
- color: "#00000000"
- visible: false
- border.color: "#e6e6e6"
- }
-
Button {
id: copy_url_to_clipboard_button
x: 460
@@ -194,7 +183,7 @@ ApplicationWindow {
onClicked: {
mainqmladaptor.handleCopyToClipboardButtonClick(url_text.text);
- toast.show(qsTr("Copied URL into clipboard!"));
+ toast.show(qsTr("Copied URL into clipboard!"), "1000");
}
ToolTip.text: qsTr("Copy the URL into the clipboard")
@@ -218,7 +207,7 @@ ApplicationWindow {
anchors.left: parent.left
anchors.leftMargin: 0
font.bold: true
- font.pointSize: 14
+ font.pointSize: 13
fontSizeMode: Text.Fit
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
}
@@ -280,7 +269,7 @@ ApplicationWindow {
onClicked: {
mainqmladaptor.handleCopyToClipboardButtonClick(pin_text.text);
- toast.show(qsTr("Copied PIN into clipboard!"));
+ toast.show(qsTr("Copied PIN into clipboard!"), "1000");
}
ToolTip.text: qsTr("Copy the pin into the clipboard")
@@ -325,34 +314,42 @@ ApplicationWindow {
clip: false
fontSizeMode: Text.Fit
}
-
- Rectangle {
- id: your_pin_seperator
- x: 46
- y: 76
- width: 320
- height: 1
- color: "#00000000"
- visible: false
- border.color: "#e6e6e6"
- }
}
- Rectangle {
- id: top_menu_bar_rect
+ Material.theme: theme.position < 1 ? Material.Light : Material.Dark
+
+ Control {
+ id: top_menu_bar_frame
width: parent.width
height: parent.height * 0.10
- color: "#0d5eaf"
+
+ background: Rectangle {
+ color: parent.Material.background
+ border.color: parent.Material.background
+ }
+ Material.background: "#0d5eaf"
+ Material.foreground: "#ffffff"
+
anchors.left: parent.left
anchors.leftMargin: 0
anchors.top: parent.top
anchors.topMargin: 0
+ Switch {
+ id: theme
+ height: parent.height
+ anchors.margins: 10
+ text: "Dark theme"
+ anchors.left: sidemenu_open_button.right
+ anchors.leftMargin: 15
+ anchors.verticalCenter: parent.verticalCenter
+ checked: true
+ }
+
Label {
id: header_text
- y: 19
- width: parent.width * 0.90
height: parent.height
+ color: "#ffffff"
text: qsTr("Allow Remote Control")
padding: 5
font.family: "Verdana"
@@ -392,6 +389,7 @@ ApplicationWindow {
fillMode: Image.PreserveAspectFit
}
}
+
}
Page {
@@ -468,7 +466,6 @@ ApplicationWindow {
onClicked: page.visible = page.visible ? false : true, checked = false
}
}
-
}
@@ -500,96 +497,12 @@ ApplicationWindow {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/*##^## Designer {
D{i:1;anchors_x:0;anchors_y:339}D{i:5;anchors_x:0}D{i:7;anchors_x:15;anchors_y:115}
-D{i:14;anchors_x:47;anchors_y:0}D{i:15;anchors_height:50}D{i:10;anchors_y:154}D{i:19;anchors_height:35;anchors_x:73;anchors_y:35}
-D{i:20;anchors_y:0}D{i:16;anchors_height:35;anchors_width:350;anchors_x:379;anchors_y:183}
-D{i:24;anchors_x:15;anchors_y:17}D{i:22;anchors_x:0;anchors_y:0}
+D{i:11;anchors_height:20;anchors_width:20}D{i:10;anchors_y:154}D{i:14;anchors_x:47;anchors_y:0}
+D{i:15;anchors_height:50}D{i:16;anchors_height:35;anchors_width:350;anchors_x:379;anchors_y:183}
+D{i:19;anchors_height:35;anchors_x:73;anchors_y:35}D{i:18;anchors_height:35;anchors_x:73;anchors_y:35}
+D{i:20;anchors_y:0}D{i:21;anchors_x:0;anchors_y:0}D{i:23;anchors_x:15;anchors_y:17}
+D{i:24;anchors_height:20;anchors_width:200;anchors_x:15;anchors_y:10}
}
##^##*/