Redesigned StandardDialog

This commit is contained in:
Sander Ferdinand 2018-03-20 00:58:49 +01:00 committed by moneromooo-monero
parent 69b4d56fdd
commit 3ba4224b69
2 changed files with 47 additions and 16 deletions

View File

@ -27,7 +27,7 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 1.4 import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
@ -76,7 +76,7 @@ Rectangle {
// Center // Center
if(!isMobile) { if(!isMobile) {
root.x = parent.width/2 - root.width/2 root.x = parent.width/2 - root.width/2
root.y = screenHeight/2 - root.height/2 root.y = 100
} }
show() show()
root.z = 11 root.z = 11
@ -89,13 +89,13 @@ Rectangle {
} }
// TODO: implement without hardcoding sizes // TODO: implement without hardcoding sizes
width: isMobile ? screenWidth : 480 width: isMobile ? screenWidth : 520
height: isMobile ? screenHeight : 280 height: isMobile ? screenHeight : 380
ColumnLayout { ColumnLayout {
id: mainLayout id: mainLayout
spacing: 10 spacing: 10
anchors { fill: parent; margins: 35 } anchors { fill: parent; margins: 15 }
RowLayout { RowLayout {
id: column id: column
@ -117,16 +117,14 @@ Rectangle {
id : dialogContent id : dialogContent
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
font.family: "Arial" renderType: Text.QtRendering
font.family: Style.fontLight
textFormat: TextEdit.AutoText textFormat: TextEdit.AutoText
readOnly: true readOnly: true
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
selectByMouse: false selectByMouse: false
wrapMode: TextEdit.Wrap wrapMode: TextEdit.Wrap
textColor: Style.defaultFontColor color: Style.defaultFontColor
style: TextAreaStyle {
backgroundColor: "black"
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -172,6 +170,38 @@ Rectangle {
} }
} }
// window borders
Rectangle{
width: 1
color: Style.grey
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
}
Rectangle{
width: 1
color: Style.grey
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
}
Rectangle{
height: 1
color: Style.grey
anchors.left: parent.left
anchors.top: parent.top
anchors.right: parent.right
}
Rectangle{
height: 1
color: Style.grey
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.right: parent.right
}
} }

View File

@ -588,11 +588,7 @@ ApplicationWindow {
+ ", fee: " + walletManager.displayAmount(transaction.fee)); + ", fee: " + walletManager.displayAmount(transaction.fee));
// here we show confirmation popup; // here we show confirmation popup;
transactionConfirmationPopup.title = qsTr("Please confirm transaction:\n") + translationManager.emptyString;
transactionConfirmationPopup.title = qsTr("Confirmation") + translationManager.emptyString
transactionConfirmationPopup.text = qsTr("Please confirm transaction:\n");
for (var i = 0; i < transaction.subaddrIndices.length; ++i)
transactionConfirmationPopup.text += qsTr("\nSpending address index: ") + transaction.subaddrIndices[i]
transactionConfirmationPopup.text += transactionConfirmationPopup.text +=
(address === "" ? "" : (qsTr("\n\nAddress: ") + address)) (address === "" ? "" : (qsTr("\n\nAddress: ") + address))
+ (paymentId === "" ? "" : (qsTr("\nPayment ID: ") + paymentId)) + (paymentId === "" ? "" : (qsTr("\nPayment ID: ") + paymentId))
@ -601,7 +597,12 @@ ApplicationWindow {
+ qsTr("\n\nRingsize: ") + (mixinCount + 1) + qsTr("\n\nRingsize: ") + (mixinCount + 1)
+ qsTr("\n\Number of transactions: ") + transaction.txCount + qsTr("\n\Number of transactions: ") + transaction.txCount
+ (transactionDescription === "" ? "" : (qsTr("\n\nDescription: ") + transactionDescription)) + (transactionDescription === "" ? "" : (qsTr("\n\nDescription: ") + transactionDescription))
+ translationManager.emptyString
for (var i = 0; i < transaction.subaddrIndices.length; ++i){
transactionConfirmationPopup.text += qsTr("\nSpending address index: ") + transaction.subaddrIndices[i];
}
transactionConfirmationPopup.text += translationManager.emptyString;
transactionConfirmationPopup.icon = StandardIcon.Question transactionConfirmationPopup.icon = StandardIcon.Question
transactionConfirmationPopup.open() transactionConfirmationPopup.open()
} }