diff options
author | Lasse Räihä <lasse.raiha@qt.io> | 2017-09-22 13:27:59 +0300 |
---|---|---|
committer | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-11-22 10:40:54 +0000 |
commit | 3845fec1ba882fc86be543cf2d79df71e484e510 (patch) | |
tree | 895e9152056e78816dfbd7b83aba6b50437ea564 /src/settingsui/power | |
parent | 3895b8504f65346a1de19aa1ceb9570175337283 (diff) |
Settings-plugin update
Task-number: QTBUG-63091
Change-Id: I116e768704f61c54d393ff00416ef03cc1885c0b
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Diffstat (limited to 'src/settingsui/power')
-rw-r--r-- | src/settingsui/power/Power.qml | 65 |
1 files changed, 18 insertions, 47 deletions
diff --git a/src/settingsui/power/Power.qml b/src/settingsui/power/Power.qml index 5adaaa6..4d924a5 100644 --- a/src/settingsui/power/Power.qml +++ b/src/settingsui/power/Power.qml @@ -32,57 +32,28 @@ import QtDemoLauncher.QtButtonImageProvider 1.0 Item { id: root - property int margin: root.width * 0.05 - Text { - id: powerText + Column { anchors.top: parent.top - anchors.left: parent.left - fontSizeMode: Text.Fit - minimumPixelSize: 1 - font.pixelSize: parent.height * 0.05 - color: "white" - text: qsTr("Power") - font.family: appFont - font.styleName: "Bold" - } - Rectangle { - id: btmLine - anchors.top: powerText.bottom - anchors.topMargin: parent.height * 0.025 - anchors.left: powerText.left - width: parent.width * 0.275 - height: parent.height * 0.005 - } + spacing: pluginMain.margin - QtButton { - id: shutdownButton - width: btmLine.width - height: parent.height * 0.075 - anchors.top: btmLine.bottom - anchors.topMargin: parent.height * 0.05 - fillColor: "#41cd52" - borderColor: "transparent" - text: qsTr("SHUTDOWN") - onClicked: { - shutdownPopup.powerOffText = qsTr("Shut down the system?") - shutdownPopup.buttonText = qsTr("SHUT DOWN") - shutdownPopup.open() + QtButton { + id: shutdownButton + width: root.width * 0.25 + height: pluginMain.fieldHeight + fillColor: "#41cd52" + borderColor: "transparent" + text: qsTr("SHUTDOWN") + onClicked: shutdownPopup.open(true) } - } - QtButton { - id: rebootButton - width: btmLine.width - height: parent.height * 0.075 - anchors.top: shutdownButton.bottom - anchors.topMargin: parent.height * 0.05 - fillColor: "#41cd52" - borderColor: "transparent" - text: qsTr("REBOOT") - onClicked: { - shutdownPopup.powerOffText = qsTr("Reboot the system?") - shutdownPopup.buttonText = qsTr("REBOOT") - shutdownPopup.open() + QtButton { + id: rebootButton + width: root.width * 0.25 + height: pluginMain.fieldHeight + fillColor: "#41cd52" + borderColor: "transparent" + text: qsTr("REBOOT") + onClicked: shutdownPopup.open(false) } } } |