summaryrefslogtreecommitdiffstats
path: root/startupscreen/WifiButton.qml
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2020-10-23 15:32:54 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2020-10-29 05:43:55 +0000
commit31a633bc93eb2eaff4d50596c69db0ad83a3e6cf (patch)
tree754e90145a71900cbf24888a6d676afca6d591ae /startupscreen/WifiButton.qml
parent25842566eee73aa8f2b07dcd334d47d6f6853579 (diff)
startupscreen: enable usb mode switch
The USB button can be used switch the USB Ethernet driver mode between cdcecm and rndis to work with Linux, Windows and macOS host machines. Task-number: QTBUG-87857 Change-Id: Iab54d7582bdd9c39fca95dfa0bb8637d5ea14e81 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Diffstat (limited to 'startupscreen/WifiButton.qml')
-rw-r--r--startupscreen/WifiButton.qml19
1 files changed, 10 insertions, 9 deletions
diff --git a/startupscreen/WifiButton.qml b/startupscreen/WifiButton.qml
index 0f617e5..fd34a90 100644
--- a/startupscreen/WifiButton.qml
+++ b/startupscreen/WifiButton.qml
@@ -54,7 +54,7 @@ import StartupScreen
Item {
id: root
- property int iconHeight
+ signal pressed()
Rectangle {
id: buttonBackground
@@ -72,6 +72,7 @@ Item {
}
onReleased: {
root.scale = 1.0
+ root.pressed()
if (root.state == "")
root.state = "working"
@@ -85,14 +86,14 @@ Item {
// icons for signal strengths (from 0 to 3)
Image {
id: icon_signal_0
- height: iconHeight-12
+ height: parent.height * 0.9
source: "assets/icon_wifi_0.png"
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
}
Image {
id: icon_signal_1
- height: iconHeight-12
+ height: parent.height * 0.9
source: "assets/icon_wifi_1.png"
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
@@ -100,7 +101,7 @@ Item {
}
Image {
id: icon_signal_2
- height: iconHeight-12
+ height: parent.height * 0.9
source: "assets/icon_wifi_2.png"
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
@@ -108,7 +109,7 @@ Item {
}
Image {
id: icon_signal_3
- height: iconHeight-12
+ height: parent.height * 0.9
source: "assets/icon_wifi_3.png"
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
@@ -118,7 +119,7 @@ Item {
// marker for the error, working and OK states
Image {
id: markerBackground
- height: iconHeight/2
+ height: parent.height * 0.5
anchors.right: parent.right
anchors.bottom: parent.bottom
@@ -129,7 +130,7 @@ Item {
Image {
id: errorIcon
- height: parent.height *0.5
+ height: parent.height * 0.5
anchors.centerIn: parent
source: "assets/icon_error.png"
fillMode: Image.PreserveAspectFit
@@ -137,7 +138,7 @@ Item {
}
Image {
id: workingIcon
- height: parent.height *0.75
+ height: parent.height * 0.75
anchors.centerIn: parent
source: "assets/icon_working.png"
fillMode: Image.PreserveAspectFit
@@ -153,7 +154,7 @@ Item {
}
Image {
id: okIcon
- height: parent.height *0.5
+ height: parent.height * 0.5
anchors.centerIn: parent
source: "assets/icon_ok.png"
fillMode: Image.PreserveAspectFit