Fixes runtime QML warning

This commit is contained in:
Sander Ferdinand 2018-03-24 20:48:19 +01:00 committed by moneromooo-monero
parent 3f9926487d
commit c001e31241
21 changed files with 50 additions and 38 deletions

View file

@ -27,6 +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.2 import QtQuick 2.2
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import moneroComponents.Wallet 1.0 import moneroComponents.Wallet 1.0
import moneroComponents.NetworkType 1.0 import moneroComponents.NetworkType 1.0
@ -101,7 +102,7 @@ Rectangle {
// @TODO: customDecorations? // @TODO: customDecorations?
anchors.topMargin: (persistentSettings.customDecorations)? 50 : 0 anchors.topMargin: (persistentSettings.customDecorations)? 50 : 0
Row { RowLayout {
visible: true visible: true
Item { Item {
anchors.left: parent.left anchors.left: parent.left

View file

@ -59,7 +59,7 @@ RowLayout {
Text { Text {
id: label id: label
font.family: Style.fontLight font.family: Style.fontLight.name
font.pixelSize: checkBox.fontSize font.pixelSize: checkBox.fontSize
color: Style.defaultFontColor color: Style.defaultFontColor
wrapMode: Text.Wrap wrapMode: Text.Wrap

View file

@ -73,7 +73,7 @@ Item {
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 2 anchors.topMargin: 2
anchors.left: parent.left anchors.left: parent.left
font.family: Style.fontLight font.family: Style.fontLight.name
font.pixelSize: 14 font.pixelSize: 14
font.bold: false font.bold: false
textFormat: Text.RichText textFormat: Text.RichText

View file

@ -81,7 +81,7 @@ Item {
Layout.fillWidth: true Layout.fillWidth: true
font.pixelSize: 16 * scaleRatio font.pixelSize: 16 * scaleRatio
font.family: Style.fontLight font.family: Style.fontLight.name
color: Style.defaultFontColor color: Style.defaultFontColor
} }
@ -94,7 +94,7 @@ Item {
anchors.left: parent.left anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
font.family: Style.fontLight font.family: Style.fontLight.name
font.pixelSize: 24 * scaleRatio font.pixelSize: 24 * scaleRatio
KeyNavigation.tab: okButton KeyNavigation.tab: okButton
bottomPadding: 10 bottomPadding: 10

View file

@ -40,7 +40,7 @@ TextArea {
property int fontSize: 18 * scaleRatio property int fontSize: 18 * scaleRatio
id: textArea id: textArea
font.family: Style.fontRegular font.family: Style.fontRegular.name
font.pixelSize: fontSize font.pixelSize: fontSize
font.bold: false font.bold: false
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft

View file

@ -57,7 +57,7 @@ Item {
if(fontFamily){ if(fontFamily){
return fontFamily; return fontFamily;
} else { } else {
return Style.fontLight; return Style.fontRegular.name;
} }
} }
font.pixelSize: fontSize font.pixelSize: fontSize

View file

@ -61,7 +61,7 @@ Item {
property alias labelTextFormat: inputLabel.textFormat property alias labelTextFormat: inputLabel.textFormat
property string backgroundColor: "transparent" property string backgroundColor: "transparent"
property string tipText: "" property string tipText: ""
property int labelFontSize: 14 * scaleRatio property int labelFontSize: 16 * scaleRatio
property bool labelFontBold: false property bool labelFontBold: false
property alias labelWrapMode: inputLabel.wrapMode property alias labelWrapMode: inputLabel.wrapMode
property alias labelHorizontalAlignment: inputLabel.horizontalAlignment property alias labelHorizontalAlignment: inputLabel.horizontalAlignment
@ -99,7 +99,7 @@ Item {
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.topMargin: 2 * scaleRatio anchors.topMargin: 2 * scaleRatio
font.family: Style.fontLight font.family: Style.fontLight.name
font.pixelSize: labelFontSize font.pixelSize: labelFontSize
font.bold: labelFontBold font.bold: labelFontBold
textFormat: Text.RichText textFormat: Text.RichText

View file

@ -63,8 +63,8 @@ ColumnLayout {
id: inputLabel id: inputLabel
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
font.family: Style.fontLight font.family: Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 16 * scaleRatio
font.bold: labelFontBold font.bold: labelFontBold
textFormat: Text.RichText textFormat: Text.RichText
color: Style.defaultFontColor color: Style.defaultFontColor

View file

@ -27,6 +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.Layouts 1.1
import moneroComponents.Wallet 1.0 import moneroComponents.Wallet 1.0
import "." 1.0 import "." 1.0
@ -50,8 +51,8 @@ Rectangle {
return qsTr("Invalid connection status") return qsTr("Invalid connection status")
} }
Row { RowLayout {
height: 40 * scaleRatio Layout.preferredHeight: 40 * scaleRatio
Item { Item {
id: iconItem id: iconItem

View file

@ -104,7 +104,7 @@ Item {
Layout.fillWidth: true Layout.fillWidth: true
font.pixelSize: 16 * scaleRatio font.pixelSize: 16 * scaleRatio
font.family: Style.fontLight font.family: Style.fontLight.name
color: Style.defaultFontColor color: Style.defaultFontColor
} }
@ -116,7 +116,7 @@ Item {
anchors.left: parent.left anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
font.family: Style.fontLight font.family: Style.fontLight.name
font.pixelSize: 24 * scaleRatio font.pixelSize: 24 * scaleRatio
echoMode: TextInput.Password echoMode: TextInput.Password
bottomPadding: 10 bottomPadding: 10
@ -162,7 +162,7 @@ Item {
Layout.fillWidth: true Layout.fillWidth: true
font.pixelSize: 16 * scaleRatio font.pixelSize: 16 * scaleRatio
font.family: Style.fontLight font.family: Style.fontLight.name
color: Style.defaultFontColor color: Style.defaultFontColor
} }
@ -174,7 +174,7 @@ Item {
anchors.left: parent.left anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
font.family: Style.fontLight font.family: Style.fontLight.name
font.pixelSize: 24 * scaleRatio font.pixelSize: 24 * scaleRatio
echoMode: TextInput.Password echoMode: TextInput.Password
KeyNavigation.tab: okButton KeyNavigation.tab: okButton

View file

@ -85,7 +85,7 @@ Item {
Layout.fillWidth: true Layout.fillWidth: true
font.pixelSize: 16 * scaleRatio font.pixelSize: 16 * scaleRatio
font.family: Style.fontLight font.family: Style.fontLight.name
color: Style.defaultFontColor color: Style.defaultFontColor
} }
@ -97,7 +97,7 @@ Item {
anchors.left: parent.left anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
font.family: Style.fontLight font.family: Style.fontLight.name
font.pixelSize: 24 * scaleRatio font.pixelSize: 24 * scaleRatio
echoMode: TextInput.Password echoMode: TextInput.Password
KeyNavigation.tab: okButton KeyNavigation.tab: okButton

View file

@ -52,6 +52,7 @@ Rectangle {
} }
Item { Item {
anchors.top: item.top
anchors.topMargin: 10 * scaleRatio anchors.topMargin: 10 * scaleRatio
anchors.leftMargin: 15 * scaleRatio anchors.leftMargin: 15 * scaleRatio
anchors.rightMargin: 15 * scaleRatio anchors.rightMargin: 15 * scaleRatio
@ -59,7 +60,7 @@ Rectangle {
Text { Text {
id: progressText id: progressText
anchors.top: item.top anchors.top: parent.top
anchors.topMargin: 6 anchors.topMargin: 6
font.family: Style.fontMedium.name font.family: Style.fontMedium.name
font.pixelSize: 13 * scaleRatio font.pixelSize: 13 * scaleRatio
@ -71,7 +72,7 @@ Rectangle {
Text { Text {
id: progressTextValue id: progressTextValue
anchors.top: item.top anchors.top: parent.top
anchors.topMargin: 6 anchors.topMargin: 6
anchors.right: parent.right anchors.right: parent.right
font.family: Style.fontMedium.name font.family: Style.fontMedium.name

View file

@ -34,6 +34,8 @@ import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.0 import QtQuick.Window 2.0
import "../components" as MoneroComponents import "../components" as MoneroComponents
import "." 1.0
Rectangle { Rectangle {
id: root id: root
@ -105,8 +107,8 @@ Rectangle {
Label { Label {
id: dialogTitle id: dialogTitle
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
font.pixelSize: 18 * scaleRatio fontSize: 18 * scaleRatio
font.family: "Arial" fontFamily: "Arial"
color: Style.defaultFontColor color: Style.defaultFontColor
} }
@ -118,7 +120,7 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
renderType: Text.QtRendering renderType: Text.QtRendering
font.family: Style.fontLight font.family: Style.fontLight.name
textFormat: TextEdit.AutoText textFormat: TextEdit.AutoText
readOnly: true readOnly: true
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio

View file

@ -90,7 +90,7 @@ Item {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 12 * scaleRatio anchors.leftMargin: 12 * scaleRatio
elide: Text.ElideRight elide: Text.ElideRight
font.family: Style.fontRegular font.family: Style.fontRegular.name
font.bold: dropdown.headerFontBold font.bold: dropdown.headerFontBold
font.pixelSize: dropdown.fontHeaderSize font.pixelSize: dropdown.fontHeaderSize
color: "#FFFFFF" color: "#FFFFFF"

View file

@ -42,7 +42,7 @@ ListView {
delegate: Rectangle { delegate: Rectangle {
id: delegate id: delegate
height: 74 height: 80
color: 'transparent'; color: 'transparent';
anchors.topMargin: 0 anchors.topMargin: 0
width: listView.width width: listView.width
@ -57,7 +57,7 @@ ListView {
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 5 anchors.leftMargin: 10
anchors.topMargin: 12 anchors.topMargin: 12
anchors.rightMargin: 54 anchors.rightMargin: 54
anchors.bottomMargin: 0 anchors.bottomMargin: 0

View file

@ -74,7 +74,7 @@ Rectangle {
text: qsTr("Mining with your computer helps strengthen the Monero network. The more that people mine, the harder it is for the network to be attacked, and every little bit helps.<br> <br>Mining also gives you a small chance to earn some Monero. Your computer will create hashes looking for block solutions. If you find a block, you will get the associated reward. Good luck!") + translationManager.emptyString text: qsTr("Mining with your computer helps strengthen the Monero network. The more that people mine, the harder it is for the network to be attacked, and every little bit helps.<br> <br>Mining also gives you a small chance to earn some Monero. Your computer will create hashes looking for block solutions. If you find a block, you will get the associated reward. Good luck!") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.fillWidth: true Layout.fillWidth: true
font.family: Style.fontRegular font.family: Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor color: Style.defaultFontColor
} }

View file

@ -211,7 +211,7 @@ Rectangle {
Rectangle { Rectangle {
id: tableRect id: tableRect
property int table_max_height: 240 property int table_max_height: 260
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: table.contentHeight < table_max_height ? table.contentHeight : table_max_height Layout.preferredHeight: table.contentHeight < table_max_height ? table.contentHeight : table_max_height
color: "transparent" color: "transparent"

View file

@ -256,7 +256,14 @@ Rectangle {
daemonAddrLabelText: qsTr("Address") daemonAddrLabelText: qsTr("Address")
daemonPortLabelText: qsTr("Port") daemonPortLabelText: qsTr("Port")
daemonAddrText: persistentSettings.bootstrapNodeAddress.split(":")[0].trim() daemonAddrText: persistentSettings.bootstrapNodeAddress.split(":")[0].trim()
daemonPortText: (persistentSettings.bootstrapNodeAddress.split(":")[1].trim() == "") ? "18081" : persistentSettings.bootstrapNodeAddress.split(":")[1] daemonPortText: {
var node_split = persistentSettings.bootstrapNodeAddress.split(":");
if(node_split.length == 2){
(node_split[1].trim() == "") ? "18081" : node_split[1];
} else {
return ""
}
}
onEditingFinished: { onEditingFinished: {
persistentSettings.bootstrapNodeAddress = daemonAddrText ? bootstrapNodeEdit.getAddress() : ""; persistentSettings.bootstrapNodeAddress = daemonAddrText ? bootstrapNodeEdit.getAddress() : "";
console.log("setting bootstrap node to " + persistentSettings.bootstrapNodeAddress) console.log("setting bootstrap node to " + persistentSettings.bootstrapNodeAddress)

View file

@ -107,7 +107,7 @@ Rectangle {
text: qsTr("This page lets you sign/verify a message (or file contents) with your address.") + translationManager.emptyString text: qsTr("This page lets you sign/verify a message (or file contents) with your address.") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.fillWidth: true Layout.fillWidth: true
font.family: Style.fontRegular font.family: Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor color: Style.defaultFontColor
} }

View file

@ -140,7 +140,7 @@ Rectangle {
Layout.preferredHeight: warningText.height + 40 Layout.preferredHeight: warningText.height + 40
Image { Image {
anchors.verticalCenter: statusRect.verticalCenter Layout.alignment: Qt.AlignVCenter
Layout.preferredHeight: 33 Layout.preferredHeight: 33
Layout.preferredWidth: 33 Layout.preferredWidth: 33
Layout.leftMargin: 10 Layout.leftMargin: 10
@ -155,7 +155,7 @@ Rectangle {
Layout.leftMargin: 6 Layout.leftMargin: 6
text: qsTr("This page lets you sign/verify a message (or file contents) with your address.") + translationManager.emptyString text: qsTr("This page lets you sign/verify a message (or file contents) with your address.") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
font.family: Style.fontRegular font.family: Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor color: Style.defaultFontColor
textFormat: Text.RichText textFormat: Text.RichText
@ -210,7 +210,7 @@ Rectangle {
Layout.topMargin: 14 Layout.topMargin: 14
text: qsTr("Transaction priority") + translationManager.emptyString text: qsTr("Transaction priority") + translationManager.emptyString
fontBold: false fontBold: false
fontSize: 14 fontSize: 16
} }
// Note: workaround for translations in listElements // Note: workaround for translations in listElements
// ListElement: cannot use script for property value, so // ListElement: cannot use script for property value, so
@ -408,7 +408,7 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Label { Label {
id: privacyLabel id: privacyLabel
fontSize: 14 fontSize: 15
text: "" text: ""
} }

View file

@ -71,7 +71,7 @@ Rectangle {
"For the case of outgoing payments, you can get a 'Spend Proof' that proves the authorship of a transaction. In this case, you don't need to specify the recipient address.") + translationManager.emptyString "For the case of outgoing payments, you can get a 'Spend Proof' that proves the authorship of a transaction. In this case, you don't need to specify the recipient address.") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.fillWidth: true Layout.fillWidth: true
font.family: Style.fontRegular font.family: Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor color: Style.defaultFontColor
} }
@ -145,7 +145,7 @@ Rectangle {
"For the case with Spend Proof, you don't need to specify the recipient address.") + translationManager.emptyString "For the case with Spend Proof, you don't need to specify the recipient address.") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.fillWidth: true Layout.fillWidth: true
font.family: Style.fontRegular font.family: Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor color: Style.defaultFontColor
} }
@ -228,7 +228,7 @@ Rectangle {
text: qsTr("If a payment had several transactions then each must be checked and the results combined.") + translationManager.emptyString text: qsTr("If a payment had several transactions then each must be checked and the results combined.") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.fillWidth: true Layout.fillWidth: true
font.family: Style.fontRegular font.family: Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor color: Style.defaultFontColor
} }