Index: sources/gui/qml/dialogs/ConfirmDialog.qml =================================================================== diff -u -r6e18f1d24b8cc3d84d26f46f36f73deb34e54371 -r4da79084388ac25822ab24fb52ec1ca4083b50cc --- sources/gui/qml/dialogs/ConfirmDialog.qml (.../ConfirmDialog.qml) (revision 6e18f1d24b8cc3d84d26f46f36f73deb34e54371) +++ sources/gui/qml/dialogs/ConfirmDialog.qml (.../ConfirmDialog.qml) (revision 4da79084388ac25822ab24fb52ec1ca4083b50cc) @@ -31,10 +31,16 @@ property alias messageText : _messageText.text property alias confirmText : _confirmTouch.textString property alias confirmVisible : _confirmTouch.visible + property bool isConfirmDefault : true property alias cancelText : _cancelTouch.textString property alias cancelVisible : _cancelTouch.visible + property bool extraVisible : false + property string extraText : "" property bool autoClose : true + property int messageTextVerticalOffset : Variables.defaultMargin * -3 // adjust text up to add more space for bottom buttons + property int footerBottomMargin : Variables.notificationHeight + Variables.minVGap + signal extraButtonClicked() height : Variables.smallDialogHeight width : Variables.smallDialogWidth @@ -53,7 +59,7 @@ TitleText { id: _messageText anchors.centerIn : parent - anchors.verticalCenterOffset: Variables.defaultMargin * -3 // adjust text up to add more space from bottom buttons + anchors.verticalCenterOffset: _root.messageTextVerticalOffset// adjust text up to add more space from bottom buttons width : parent.width height : Variables.mainMenuHeight * 4 // title + reason + 2*Gap clip : true @@ -62,12 +68,16 @@ Footer { id: _footer anchors.horizontalCenter : parent.horizontalCenter + anchors.bottomMargin : _root.footerBottomMargin childrenWidth: Variables.defaultButtonWidth children: [ TouchRect { id : _cancelTouch textString : qsTr("Cancel") height : Variables.defaultButtonHeight + text.font.pixelSize : Fonts.fontPixelConfirm + text.font.weight : Font.Medium + onPressed : { rejected() if ( autoClose ) close() @@ -78,10 +88,23 @@ anchors.margins : 0 anchors.top : undefined anchors.right : undefined + isDefault : _root.isConfirmDefault onClicked: { accepted() if ( autoClose ) close() } + }, + TouchRect { id : _additionalTouch + height : Variables.defaultButtonHeight + anchors.margins : 0 + anchors.top : undefined + anchors.right : undefined + textString : _root.extraText + visible : _root.extraVisible + onClicked: { + extraButtonClicked() + if ( autoClose ) close() + } } ] }