Index: sources/gui/qml/dialogs/PowerOff.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/gui/qml/dialogs/PowerOff.qml (.../PowerOff.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/dialogs/PowerOff.qml (.../PowerOff.qml) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -25,28 +25,53 @@ * \brief Contains the PowerOff Dialog Implementation */ ModalDialog { id : _root - contentItem.objectName: "PowerOffDialog" //SquishQt testability + contentItem.objectName : "PowerOffDialog" //SquishQt testability + property alias titleText : _titleText.text + property alias messageText : _messageText.text + property alias confirmText : _confirmTouch.textString + property alias confirmVisible : _confirmTouch.visible + property alias cancelText : _cancelTouch.textString + property alias cancelVisible : _cancelTouch.visible - Column { - spacing: Variables.columnSpacing - anchors.centerIn: parent - TitleText { id: _titleText - width: parent.width - text: qsTr("Are you sure you want to Shutdown?") - } - TouchRect { id : _shutdownRect - text.text: qsTr("SHUTDOWN") - onPressed: { - accepted() - close() + notification.iconVisible: false + + function footerUpdate() { + _footer.update() + } + + TitleText { id: _titleText + width : _root.width + height : Variables.mainMenuHeight + anchors.top : parent.top + anchors.topMargin : Variables.minVGap2 // Since it doesnt have border, it looks too close to top border. + clip : true + } + + TitleText { id: _messageText + anchors.centerIn : parent + width : parent.width + height : Variables.mainMenuHeight * 4 // title + reason + 2*Gap + clip : true + text : qsTr("Are you sure you want to Shutdown?") + } + + Footer { id: _footer + childrenWidth: 350 + children: [ + TouchRect { id : _cancelTouch + textString : qsTr("CANCEL") + onPressed : { + rejected() + close() + } + }, + TouchRect { id : _confirmTouch + textString : qsTr("SHUTDOWN") + onPressed : { + accepted() + close() + } } - } - TouchRect { id : _cancelTouch - text.text: qsTr("CANCEL") - onPressed: { - rejected() - close() - } - } + ] } }