Remove scaleRatio

This commit is contained in:
dsc
2019-04-25 21:09:23 +02:00
parent e1c429110f
commit 62285b01dc
80 changed files with 1070 additions and 1075 deletions

View File

@@ -24,8 +24,8 @@ Item {
id: root
anchors.margins: 0
property int minWidth: 900 * scaleRatio
property int qrCodeSize: 220 * scaleRatio
property int minWidth: 900
property int qrCodeSize: 220
property bool enableTracking: false
property string trackingError: "" // setting this will show a message @ tracking table
property alias merchantHeight: mainLayout.height
@@ -64,7 +64,7 @@ Item {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
height: 300 * scaleRatio
height: 300
source: "qrc:///images/merchant/bg.png"
smooth: false
}
@@ -75,8 +75,8 @@ Item {
spacing: 0
// emulates max-width + center for container
property int maxWidth: 1200 * scaleRatio
property int defaultMargin: 50 * scaleRatio
property int maxWidth: 1200
property int defaultMargin: 50
property int horizontalMargin: {
if(appWindow.width >= maxWidth){
return ((appWindow.width - maxWidth) / 2) + defaultMargin;
@@ -93,7 +93,7 @@ Item {
anchors.right: parent.right
Item {
height: 220 * scaleRatio
height: 220
anchors.left: parent.left
anchors.right: parent.right
@@ -101,8 +101,8 @@ Item {
id: tracker
anchors.left: parent.left
anchors.top: parent.top
height: 220 * scaleRatio
width: (parent.width - qrImg.width) - 50 * scaleRatio
height: 220
width: (parent.width - qrImg.width) - 50
radius: 5
ColumnLayout {
@@ -113,21 +113,21 @@ Item {
RowLayout {
spacing: 0
height: 56 * scaleRatio
height: 56
RowLayout {
Layout.alignment: Qt.AlignLeft
Layout.preferredWidth: 260 * scaleRatio
Layout.preferredWidth: 260
Layout.preferredHeight: parent.height
Layout.fillHeight: true
spacing: 8 * scaleRatio
spacing: 8
Item {
Layout.preferredWidth: 10 * scaleRatio
Layout.preferredWidth: 10
}
MoneroComponents.TextPlain {
font.pixelSize: 16 * scaleRatio
font.pixelSize: 16
font.bold: true
color: "#767676"
text: qsTr("Sales") + translationManager.emptyString
@@ -146,13 +146,13 @@ Item {
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 1 * scaleRatio
Layout.preferredHeight: 1
color: "#d9d9d9"
}
MerchantTrackingList {
Layout.fillWidth: true
Layout.preferredHeight: 400 * scaleRatio
Layout.preferredHeight: 400
model: trackingModel
message: {
if(!root.enableTracking){
@@ -212,7 +212,7 @@ Item {
Image {
id: qrCode
anchors.fill: parent
anchors.margins: 1 * scaleRatio
anchors.margins: 1
smooth: false
fillMode: Image.PreserveAspectFit
@@ -257,18 +257,18 @@ Item {
}
Item {
Layout.preferredHeight: 40 * scaleRatio
Layout.preferredHeight: 40
anchors.left: parent.left
anchors.right: parent.right
Item {
width: (parent.width - qrImg.width) - (50 * scaleRatio)
height: 32 * scaleRatio
width: (parent.width - qrImg.width) - (50)
height: 32
MoneroComponents.TextPlain {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 12 * scaleRatio
font.pixelSize: 12
font.bold: false
color: "white"
text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 12px;}</style>Currently selected address: " + addressLabel + " <a href='#'>(Change)</a>"
@@ -287,13 +287,13 @@ Item {
Item {
anchors.right: parent.right
anchors.top: parent.top
width: 220 * scaleRatio
height: 32 * scaleRatio
width: 220
height: 32
MoneroComponents.TextPlain {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 12 * scaleRatio
font.pixelSize: 12
font.bold: false
color: "white"
text: qsTr("(right-click, save as)") + translationManager.emptyString
@@ -303,16 +303,16 @@ Item {
}
Item {
Layout.preferredHeight: 120 * scaleRatio
Layout.topMargin: 20 * scaleRatio
Layout.preferredHeight: 120
Layout.topMargin: 20
Layout.fillWidth: true
Rectangle {
id: payment_url_container
anchors.left: parent.left
anchors.top: parent.top
implicitHeight: 120 * scaleRatio
width: (parent.width - qrImg.width) - (50 * scaleRatio)
implicitHeight: 120
width: (parent.width - qrImg.width) - (50)
radius: 5
ColumnLayout {
@@ -323,21 +323,21 @@ Item {
RowLayout {
spacing: 0
height: 56 * scaleRatio
height: 56
RowLayout {
Layout.alignment: Qt.AlignLeft
Layout.preferredWidth: 260 * scaleRatio
Layout.preferredWidth: 260
Layout.preferredHeight: parent.height
Layout.fillHeight: true
spacing: 8
Item {
Layout.preferredWidth: 10 * scaleRatio
Layout.preferredWidth: 10
}
MoneroComponents.TextPlain {
font.pixelSize: 14 * scaleRatio
font.pixelSize: 14
font.bold: true
color: "#767676"
text: qsTr("Payment URL") + translationManager.emptyString
@@ -353,15 +353,15 @@ Item {
// Rectangle {
// // help box
// Layout.alignment: Qt.AlignLeft
// Layout.preferredWidth: 40 * scaleRatio
// Layout.preferredWidth: 40
// Layout.fillHeight: true
// color: "transparent"
// MoneroComponents.TextPlain {
// anchors.verticalCenter: parent.verticalCenter
// anchors.right: parent.right
// anchors.rightMargin: 20 * scaleRatio
// font.pixelSize: 16 * scaleRatio
// anchors.rightMargin: 20
// font.pixelSize: 16
// font.bold: true
// color: "#767676"
// text:"?"
@@ -394,13 +394,13 @@ Item {
MoneroComponents.TextPlain {
property string _color: "#767676"
Layout.fillWidth: true
Layout.margins: 20 * scaleRatio
Layout.topMargin: 10 * scaleRatio
Layout.margins: 20
Layout.topMargin: 10
wrapMode: Text.WrapAnywhere
elide: Text.ElideRight
font.pixelSize: 12 * scaleRatio
font.pixelSize: 12
font.bold: true
color: _color
text: TxUtils.makeQRCodeString(appWindow.current_address, amountToReceive.text)
@@ -441,15 +441,15 @@ Item {
Item {
anchors.right: parent.right
anchors.top: parent.top
width: 220 * scaleRatio
height: 32 * scaleRatio
width: 220
height: 32
ColumnLayout {
anchors.left: parent.left
anchors.right: parent.right
MoneroComponents.TextPlain {
font.pixelSize: 14 * scaleRatio
font.pixelSize: 14
font.bold: false
color: "white"
text: qsTr("Amount to receive") + " (XMR)"
@@ -457,20 +457,20 @@ Item {
}
Image {
height: 28 * scaleRatio
width: 220 * scaleRatio
height: 28
width: 220
source: "qrc:///images/merchant/input_box.png"
TextField {
id: amountToReceive
topPadding: 0
leftPadding: 10 * scaleRatio
leftPadding: 10
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 3 * scaleRatio
font.pixelSize: 16 * scaleRatio
anchors.topMargin: 3
font.pixelSize: 16
font.bold: true
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
@@ -495,14 +495,14 @@ Item {
}
Item {
height: 2 * scaleRatio
width: 220 * scaleRatio
height: 2
width: 220
}
MoneroComponents.TextPlain {
// @TODO: When we have XMR/USD rate avi. in the future.
visible: false
font.pixelSize: 14 * scaleRatio
font.pixelSize: 14
font.bold: false
color: "white"
text: qsTr("Amount to receive") + " (USD)"
@@ -512,8 +512,8 @@ Item {
Image {
visible: false
height: 28 * scaleRatio
width: 220 * scaleRatio
height: 28
width: 220
source: "qrc:///images/merchant/input_box.png"
opacity: 0.2
}
@@ -522,13 +522,13 @@ Item {
}
Item {
Layout.topMargin: 32 * scaleRatio
Layout.preferredHeight: 40 * scaleRatio
Layout.topMargin: 32
Layout.preferredHeight: 40
anchors.left: parent.left
anchors.right: parent.right
ColumnLayout {
spacing: 16 * scaleRatio
spacing: 16
MerchantCheckbox {
id: trackingCheckbox
@@ -542,7 +542,7 @@ Item {
MoneroComponents.TextPlain {
id: content
font.pixelSize: 14 * scaleRatio
font.pixelSize: 14
font.bold: false
color: "white"
text: qsTr("Leave this page") + translationManager.emptyString
@@ -563,16 +563,16 @@ Item {
// Shows when the window is too small
visible: parent.width < root.minWidth
anchors.top: parent.top
anchors.topMargin: 100 * scaleRatio;
anchors.topMargin: 100;
anchors.horizontalCenter: parent.horizontalCenter
height: 120 * scaleRatio
width: 400 * scaleRatio
height: 120
width: 400
radius: 5
MoneroComponents.TextPlain {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 14 * scaleRatio
font.pixelSize: 14
font.bold: true
color: MoneroComponents.Style.moneroGrey
text: qsTr("The merchant page requires a larger window") + translationManager.emptyString

View File

@@ -6,7 +6,7 @@ import "../../components" as MoneroComponents
RowLayout {
id: root
spacing: 10 * scaleRatio
spacing: 10
property bool checked: false;
property alias text: content.text
signal changed;
@@ -15,8 +15,8 @@ RowLayout {
id: checkbox
anchors.left: parent.left
anchors.top: parent.top
implicitHeight: 22 * scaleRatio
width: 22 * scaleRatio
implicitHeight: 22
width: 22
radius: 5
Image {
@@ -29,7 +29,7 @@ RowLayout {
MoneroComponents.TextPlain {
id: content
font.pixelSize: 14 * scaleRatio
font.pixelSize: 14
font.bold: false
color: "white"
text: ""

View File

@@ -45,7 +45,7 @@ Rectangle {
height: {
if(!persistentSettings.customDecorations || isMobile) return 0;
return 50 * scaleRatio;
return 50;
}
z: 1

View File

@@ -28,11 +28,11 @@ ListView {
// message box
visible: parent.message !== ""
anchors.fill: parent
anchors.margins: 20 * scaleRatio
anchors.topMargin: 10 * scaleRatio
anchors.margins: 20
anchors.topMargin: 10
wrapMode: Text.Wrap
font.pixelSize: 14 * scaleRatio
font.pixelSize: 14
font.bold: false
color: "#767676"
textFormat: Text.RichText
@@ -46,7 +46,7 @@ ListView {
delegate: Item {
id: trackingTableItem
visible: trackingListView.message === ""
height: 53 * scaleRatio
height: 53
width: parent.width
Layout.fillWidth: true
@@ -58,22 +58,22 @@ ListView {
Item {
Layout.preferredHeight: parent.height
Layout.preferredWidth: 20 * scaleRatio
Layout.preferredWidth: 20
}
ColumnLayout {
spacing: 0
Layout.preferredHeight: 40 * scaleRatio
Layout.preferredWidth: 240 * scaleRatio
Layout.preferredHeight: 40
Layout.preferredWidth: 240
Item {
Layout.preferredWidth: parent.width
Layout.preferredHeight: 18 * scaleRatio
Layout.preferredHeight: 18
TextEdit {
id: dateString
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 13 * scaleRatio
font.pixelSize: 13
font.bold: false
color: "#707070"
text: time_date + " (" + Utils.ago(time_epoch) + ") "
@@ -93,11 +93,11 @@ ListView {
TextEdit {
id: hideAmount
anchors.top: parent.top
anchors.topMargin: 1 * scaleRatio
anchors.topMargin: 1
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
readOnly: true
font.pixelSize: 12 * scaleRatio
font.pixelSize: 12
font.bold: false
color: "#707070"
text: (hide_amount ? "(" + qsTr("show") + ")" : "(" + qsTr("hide") + ")") + translationManager.emptyString
@@ -117,12 +117,12 @@ ListView {
Item {
Layout.preferredWidth: parent.width
Layout.preferredHeight: 18 * scaleRatio
Layout.preferredHeight: 18
TextEdit {
id: amountText
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 14 * scaleRatio
font.pixelSize: 14
font.bold: true
color: hide_amount ? "#707070" : "#009F1E"
text: hide_amount ? '-' : '+' + amount
@@ -141,7 +141,7 @@ ListView {
RowLayout {
spacing: 0
Layout.preferredHeight: parent.height
Layout.preferredWidth: 240 * scaleRatio
Layout.preferredWidth: 240
Item {
Layout.fillWidth: true
@@ -149,13 +149,13 @@ ListView {
}
Item {
Layout.preferredWidth: 150 * scaleRatio
Layout.preferredWidth: 150
Layout.preferredHeight: parent.height
TextEdit {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 12 * scaleRatio
font.pixelSize: 12
font.bold: false
color: "#a8a8a8"
text: {
@@ -191,14 +191,14 @@ ListView {
}
Item {
Layout.preferredWidth: 30 * scaleRatio
Layout.preferredWidth: 30
Layout.preferredHeight: parent.height
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
Layout.preferredWidth: 12 * scaleRatio
Layout.preferredHeight: 21 * scaleRatio
Layout.preferredWidth: 12
Layout.preferredHeight: 21
source: "qrc:///images/merchant/arrow_right.png"
}
@@ -214,7 +214,7 @@ ListView {
}
Item {
Layout.preferredWidth: 10 * scaleRatio
Layout.preferredWidth: 10
Layout.preferredHeight: parent.height
}
}