mirror of
https://github.com/monero-project/monero-gui
synced 2024-12-22 03:15:52 +01:00
pages mobile scaling
This commit is contained in:
parent
9e0db8f4ff
commit
4dc0d36b98
@ -488,7 +488,7 @@ Rectangle {
|
||||
|
||||
ListModel {
|
||||
id: columnsModel
|
||||
|
||||
property int pidWidth: 127 * scaleRatio
|
||||
ListElement { columnName: "Payment ID"; columnWidth: 127 }
|
||||
ListElement { columnName: "Date"; columnWidth: 100 }
|
||||
ListElement { columnName: "Block height"; columnWidth: 150 }
|
||||
@ -498,12 +498,13 @@ Rectangle {
|
||||
|
||||
TableHeader {
|
||||
id: header
|
||||
visible: !isMobile
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 17
|
||||
anchors.leftMargin: 14
|
||||
anchors.rightMargin: 14
|
||||
anchors.topMargin: 17 * scaleRatio
|
||||
anchors.leftMargin: 14 * scaleRatio
|
||||
anchors.rightMargin: 14 * scaleRatio
|
||||
dataModel: columnsModel
|
||||
offset: 20
|
||||
onSortRequest: {
|
||||
@ -533,7 +534,7 @@ Rectangle {
|
||||
Scroll {
|
||||
id: flickableScroll
|
||||
anchors.right: table.right
|
||||
anchors.rightMargin: -14
|
||||
anchors.rightMargin: !isMobile ? -14 * scaleRatio : 0
|
||||
anchors.top: table.top
|
||||
anchors.bottom: table.bottom
|
||||
flickable: table
|
||||
@ -545,8 +546,8 @@ Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.top: header.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.leftMargin: 14
|
||||
anchors.rightMargin: 14
|
||||
anchors.leftMargin: 14 * scaleRatio
|
||||
anchors.rightMargin: 14 * scaleRatio
|
||||
onContentYChanged: flickableScroll.flickableContentYChanged()
|
||||
model: root.model
|
||||
addressBookModel: null
|
||||
|
@ -169,24 +169,23 @@ Rectangle {
|
||||
ColumnLayout {
|
||||
id: mainLayout
|
||||
anchors.margins: (isMobile)? 17 : 40
|
||||
anchors.topMargin: 40
|
||||
anchors.topMargin: 40 * scaleRatio
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
|
||||
spacing: 20
|
||||
property int labelWidth: 120
|
||||
property int editWidth: 400
|
||||
property int lineEditFontSize: 12
|
||||
property int qrCodeSize: 240
|
||||
spacing: 20 * scaleRatio
|
||||
property int labelWidth: 120 * scaleRatio
|
||||
property int editWidth: 400 * scaleRatio
|
||||
property int lineEditFontSize: 12 * scaleRatio
|
||||
property int qrCodeSize: 240 * scaleRatio
|
||||
|
||||
|
||||
ColumnLayout {
|
||||
id: addressRow
|
||||
Label {
|
||||
id: addressLabel
|
||||
fontSize: 14
|
||||
text: qsTr("Address") + translationManager.emptyString
|
||||
width: mainLayout.labelWidth
|
||||
}
|
||||
@ -218,7 +217,6 @@ Rectangle {
|
||||
Label {
|
||||
Layout.columnSpan: 2
|
||||
id: paymentIdLabel
|
||||
fontSize: 14
|
||||
text: qsTr("Payment ID") + translationManager.emptyString
|
||||
width: mainLayout.labelWidth
|
||||
}
|
||||
@ -246,7 +244,6 @@ Rectangle {
|
||||
|
||||
StandardButton {
|
||||
id: generatePaymentId
|
||||
width: 80
|
||||
shadowReleasedColor: "#FF4304"
|
||||
shadowPressedColor: "#B32D00"
|
||||
releasedColor: "#FF6C3C"
|
||||
@ -258,7 +255,6 @@ Rectangle {
|
||||
StandardButton {
|
||||
id: clearPaymentId
|
||||
enabled: !!paymentIdLine.text
|
||||
width: 80
|
||||
shadowReleasedColor: "#FF4304"
|
||||
shadowPressedColor: "#B32D00"
|
||||
releasedColor: "#FF6C3C"
|
||||
@ -272,7 +268,6 @@ Rectangle {
|
||||
id: integratedAddressRow
|
||||
Label {
|
||||
id: integratedAddressLabel
|
||||
fontSize: 14
|
||||
text: qsTr("Integrated address") + translationManager.emptyString
|
||||
width: mainLayout.labelWidth
|
||||
}
|
||||
@ -305,7 +300,6 @@ Rectangle {
|
||||
id: amountRow
|
||||
Label {
|
||||
id: amountLabel
|
||||
fontSize: 14
|
||||
text: qsTr("Amount") + translationManager.emptyString
|
||||
width: mainLayout.labelWidth
|
||||
}
|
||||
@ -333,7 +327,6 @@ Rectangle {
|
||||
|
||||
Label {
|
||||
id: trackingLabel
|
||||
fontSize: 14
|
||||
textFormat: Text.RichText
|
||||
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>\
|
||||
Tracking <font size='2'> (</font><a href='#'>help</a><font size='2'>)</font>")
|
||||
|
@ -51,17 +51,15 @@ Rectangle {
|
||||
|
||||
// Daemon settings
|
||||
daemonAddress = persistentSettings.daemon_address.split(":");
|
||||
console.log("address: " + persistentSettings.daemon_address)
|
||||
// try connecting to daemon
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: mainLayout
|
||||
anchors.margins: 17
|
||||
anchors.margins: 17 * scaleRatio
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
spacing: 10
|
||||
spacing: 10 * scaleRatio
|
||||
|
||||
//! Manage wallet
|
||||
RowLayout {
|
||||
@ -70,8 +68,7 @@ Rectangle {
|
||||
Layout.fillWidth: true
|
||||
color: "#4A4949"
|
||||
text: qsTr("Manage wallet") + translationManager.emptyString
|
||||
fontSize: 16
|
||||
Layout.topMargin: 10
|
||||
Layout.topMargin: 10 * scaleRatio
|
||||
}
|
||||
}
|
||||
|
||||
@ -243,7 +240,6 @@ Rectangle {
|
||||
id: blockchainFolderLabel
|
||||
color: "#4A4949"
|
||||
text: qsTr("Blockchain location") + translationManager.emptyString
|
||||
fontSize: 16
|
||||
}
|
||||
LineEdit {
|
||||
id: blockchainFolder
|
||||
@ -412,9 +408,8 @@ Rectangle {
|
||||
Label {
|
||||
color: "#4A4949"
|
||||
text: qsTr("Log level") + translationManager.emptyString
|
||||
fontSize: 16
|
||||
anchors.topMargin: 30
|
||||
Layout.topMargin: 30
|
||||
anchors.topMargin: 30 * scaleRatio
|
||||
Layout.topMargin: 30 * scaleRatio
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
@ -442,7 +437,6 @@ Rectangle {
|
||||
|
||||
LineEdit {
|
||||
id: logCategories
|
||||
Layout.preferredWidth: 200
|
||||
Layout.fillWidth: true
|
||||
text: appWindow.persistentSettings.logCategories
|
||||
placeholderText: qsTr("(e.g. *:WARNING,net.p2p:DEBUG)") + translationManager.emptyString
|
||||
@ -463,8 +457,8 @@ Rectangle {
|
||||
color: "#4A4949"
|
||||
text: qsTr("Debug info") + translationManager.emptyString
|
||||
fontSize: 16
|
||||
anchors.topMargin: 30
|
||||
Layout.topMargin: 30
|
||||
anchors.topMargin: 30 * scaleRatio
|
||||
Layout.topMargin: 30 * scaleRatio
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
@ -472,13 +466,11 @@ Rectangle {
|
||||
height: 1
|
||||
color: "#DEDEDE"
|
||||
}
|
||||
|
||||
TextBlock {
|
||||
Layout.topMargin: 8
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("GUI version: ") + Version.GUI_VERSION + translationManager.emptyString
|
||||
}
|
||||
|
||||
TextBlock {
|
||||
id: guiMoneroVersion
|
||||
Layout.fillWidth: true
|
||||
@ -604,7 +596,6 @@ Rectangle {
|
||||
confirmationDialog.text += qsTr("Note: lmdb folder not found. A new folder will be created.") + "\n\n"
|
||||
}
|
||||
|
||||
|
||||
confirmationDialog.icon = StandardIcon.Question
|
||||
confirmationDialog.cancelText = qsTr("Cancel")
|
||||
|
||||
@ -646,8 +637,6 @@ Rectangle {
|
||||
Component.onCompleted: {
|
||||
if(typeof daemonManager != "undefined")
|
||||
daemonManager.daemonConsoleUpdated.connect(onDaemonConsoleUpdated)
|
||||
|
||||
|
||||
}
|
||||
|
||||
function onDaemonConsoleUpdated(message){
|
||||
|
@ -39,10 +39,6 @@ import moneroComponents.WalletManager 1.0
|
||||
Rectangle {
|
||||
id: mainLayout
|
||||
|
||||
property int labelWidth: 120
|
||||
// property int editWidth: 400
|
||||
property int lineEditFontSize: 12
|
||||
|
||||
color: "#F0EEEE"
|
||||
|
||||
Clipboard { id: clipboard }
|
||||
@ -92,13 +88,13 @@ Rectangle {
|
||||
|
||||
// sign / verify
|
||||
ColumnLayout {
|
||||
anchors.margins: 17
|
||||
anchors.margins: 17 * scaleRatio
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
spacing: 20
|
||||
spacing: 20 * scaleRatio
|
||||
|
||||
// sign
|
||||
ColumnLayout {
|
||||
@ -118,9 +114,7 @@ Rectangle {
|
||||
|
||||
Label {
|
||||
id: signMessageLabel
|
||||
fontSize: 14
|
||||
text: qsTr("Either message:") + translationManager.emptyString
|
||||
width: mainLayout.labelWidth
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
@ -133,10 +127,8 @@ Rectangle {
|
||||
id: signMessageLine
|
||||
anchors.left: parent.left
|
||||
anchors.right: signMessageButton.left
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
placeholderText: qsTr("Message to sign") + translationManager.emptyString;
|
||||
readOnly: false
|
||||
// Layout.fillWidth: true
|
||||
onTextChanged: signSignatureLine.text = ""
|
||||
|
||||
IconButton {
|
||||
@ -152,7 +144,6 @@ Rectangle {
|
||||
StandardButton {
|
||||
id: signMessageButton
|
||||
anchors.right: parent.right
|
||||
width: 60
|
||||
text: qsTr("Sign") + translationManager.emptyString
|
||||
shadowReleasedColor: "#FF4304"
|
||||
shadowPressedColor: "#B32D00"
|
||||
@ -168,9 +159,7 @@ Rectangle {
|
||||
|
||||
Label {
|
||||
id: signMessageFileLabel
|
||||
fontSize: 14
|
||||
text: qsTr("Or file:") + translationManager.emptyString
|
||||
width: mainLayout.labelWidth
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
@ -192,8 +181,7 @@ Rectangle {
|
||||
|
||||
StandardButton {
|
||||
id: loadFileToSignButton
|
||||
anchors.rightMargin: 17
|
||||
width: 60
|
||||
anchors.rightMargin: 17 * scaleRatio
|
||||
text: qsTr("Select") + translationManager.emptyString
|
||||
shadowReleasedColor: "#FF4304"
|
||||
shadowPressedColor: "#B32D00"
|
||||
@ -227,7 +215,6 @@ Rectangle {
|
||||
StandardButton {
|
||||
id: signFileButton
|
||||
anchors.right: parent.right
|
||||
width: 60
|
||||
text: qsTr("Sign") + translationManager.emptyString
|
||||
shadowReleasedColor: "#FF4304"
|
||||
shadowPressedColor: "#B32D00"
|
||||
@ -243,17 +230,15 @@ Rectangle {
|
||||
|
||||
RowLayout {
|
||||
id: signSignatureRow
|
||||
anchors.topMargin: 17
|
||||
anchors.topMargin: 17 * scaleRatio
|
||||
|
||||
Label {
|
||||
id: signSignatureLabel
|
||||
fontSize: 14
|
||||
text: qsTr("Signature") + translationManager.emptyString
|
||||
}
|
||||
|
||||
LineEdit {
|
||||
id: signSignatureLine
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
placeholderText: qsTr("Signature") + translationManager.emptyString;
|
||||
readOnly: true
|
||||
Layout.fillWidth: true
|
||||
@ -290,14 +275,12 @@ Rectangle {
|
||||
|
||||
Label {
|
||||
id: verifyMessageLabel
|
||||
fontSize: 14
|
||||
text: qsTr("Either message:") + translationManager.emptyString
|
||||
width: mainLayout.labelWidth
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: verifyMessageRow
|
||||
anchors.topMargin: 17
|
||||
anchors.topMargin: 17 * scaleRatio
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
@ -305,7 +288,6 @@ Rectangle {
|
||||
id: verifyMessageLine
|
||||
anchors.left: parent.left
|
||||
anchors.right: verifyMessageButton.left
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
placeholderText: qsTr("Message to verify") + translationManager.emptyString;
|
||||
readOnly: false
|
||||
Layout.fillWidth: true
|
||||
@ -323,7 +305,6 @@ Rectangle {
|
||||
StandardButton {
|
||||
id: verifyMessageButton
|
||||
anchors.right: parent.right
|
||||
width: 60
|
||||
text: qsTr("Verify") + translationManager.emptyString
|
||||
shadowReleasedColor: "#FF4304"
|
||||
shadowPressedColor: "#B32D00"
|
||||
@ -339,14 +320,12 @@ Rectangle {
|
||||
|
||||
Label {
|
||||
id: verifyMessageFileLabel
|
||||
fontSize: 14
|
||||
text: qsTr("Or file:") + translationManager.emptyString
|
||||
width: mainLayout.labelWidth
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: verifyFileRow
|
||||
anchors.topMargin: 17
|
||||
anchors.topMargin: 17 * scaleRatio
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
@ -363,8 +342,7 @@ Rectangle {
|
||||
|
||||
StandardButton {
|
||||
id: loadFileToVerifyButton
|
||||
anchors.rightMargin: 17
|
||||
width: 60
|
||||
anchors.rightMargin: 17 * scaleRatio
|
||||
text: qsTr("Select") + translationManager.emptyString
|
||||
shadowReleasedColor: "#FF4304"
|
||||
shadowPressedColor: "#B32D00"
|
||||
@ -379,7 +357,6 @@ Rectangle {
|
||||
id: verifyFileLine
|
||||
anchors.left: loadFileToVerifyButton.right
|
||||
anchors.right: verifyFileButton.left
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
placeholderText: qsTr("Filename with message to verify") + translationManager.emptyString;
|
||||
readOnly: false
|
||||
Layout.fillWidth: true
|
||||
@ -397,7 +374,6 @@ Rectangle {
|
||||
StandardButton {
|
||||
id: verifyFileButton
|
||||
anchors.right: parent.right
|
||||
width: 60
|
||||
text: qsTr("Verify") + translationManager.emptyString
|
||||
shadowReleasedColor: "#FF4304"
|
||||
shadowPressedColor: "#B32D00"
|
||||
@ -411,17 +387,15 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
Text {
|
||||
id: verifyAddressLabel
|
||||
fontSize: 14
|
||||
width: mainLayout.labelWidth
|
||||
textFormat: Text.RichText
|
||||
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>\
|
||||
Signing address <font size='2'> ( Paste in or select from </font> <a href='#'>Address book</a><font size='2'> )</font>")
|
||||
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: %1px;}</style>\
|
||||
Signing address <font size='%2'> ( Paste in or select from </font> <a href='#'>Address book</a><font size='%3'> )</font>").arg(14 * scaleRatio).arg(2 * scaleRatio).arg(2 * scaleRatio)
|
||||
+ translationManager.emptyString
|
||||
// Layout.fillWidth: true
|
||||
wrapMode: Text.Wrap
|
||||
|
||||
font.pixelSize: 14 * scaleRatio
|
||||
Layout.fillWidth: true
|
||||
textFormat: Text.RichText
|
||||
onLinkActivated: appWindow.showPageRequest("AddressBook")
|
||||
}
|
||||
|
||||
@ -430,24 +404,22 @@ Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: verifyAddressLabel.bottom
|
||||
anchors.topMargin: 5
|
||||
anchors.topMargin: 5 * scaleRatio
|
||||
placeholderText: "4..."
|
||||
// validator: RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: verifySignatureRow
|
||||
anchors.topMargin: 17
|
||||
anchors.topMargin: 17 * scaleRatio
|
||||
|
||||
Label {
|
||||
id: verifySignatureLabel
|
||||
fontSize: 14
|
||||
text: qsTr("Signature") + translationManager.emptyString
|
||||
}
|
||||
|
||||
LineEdit {
|
||||
id: verifySignatureLine
|
||||
fontSize: mainLayout.lineEditFontSize
|
||||
placeholderText: qsTr("Signature") + translationManager.emptyString;
|
||||
Layout.fillWidth: true
|
||||
|
||||
|
@ -433,8 +433,10 @@ Rectangle {
|
||||
anchors.top: pageRoot.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 17
|
||||
spacing:10
|
||||
anchors.leftMargin: 17 * scaleRatio
|
||||
anchors.topMargin: 17 * scaleRatio
|
||||
anchors.bottomMargin: 17 * scaleRatio
|
||||
spacing: 10 * scaleRatio
|
||||
enabled: !viewOnly || pageRoot.enabled
|
||||
|
||||
RowLayout {
|
||||
@ -455,13 +457,14 @@ Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: 1
|
||||
color: "#DEDEDE"
|
||||
Layout.bottomMargin: 30
|
||||
Layout.bottomMargin: 30 * scaleRatio
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
visible: persistentSettings.transferShowAdvanced
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
Layout.fillWidth: true
|
||||
Label {
|
||||
id: privacyLabel
|
||||
fontSize: 14
|
||||
@ -489,7 +492,7 @@ Rectangle {
|
||||
|
||||
GridLayout {
|
||||
visible: persistentSettings.transferShowAdvanced
|
||||
Layout.topMargin: 50
|
||||
Layout.topMargin: 50 * scaleRatio
|
||||
|
||||
|
||||
columns: (isMobile) ? 2 : 6
|
||||
@ -657,8 +660,8 @@ Rectangle {
|
||||
Rectangle {
|
||||
x: root.width/2 - width/2
|
||||
y: root.height/2 - height/2
|
||||
height:statusText.paintedHeight + 50
|
||||
width:statusText.paintedWidth + 40
|
||||
height:statusText.paintedHeight + 50 * scaleRatio
|
||||
width:statusText.paintedWidth + 40 * scaleRatio
|
||||
visible: statusText.text != ""
|
||||
opacity: 0.9
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user