qrcodescanner: update icon with font awesome

This commit is contained in:
mmbyday 2019-04-22 19:21:01 -07:00
parent 10926644bf
commit 7b7996dc66
7 changed files with 18 additions and 12 deletions

View File

@ -1,4 +1,4 @@
// Copyright (c) 2014-2015, The Monero Project // Copyright (c) 2014-2019, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@ -43,11 +43,13 @@ Item {
property string pressedColor: "#FF4304" property string pressedColor: "#FF4304"
property string releasedColor: "#FF6C3C" property string releasedColor: "#FF6C3C"
property string icon: "" property string icon: ""
property string textColor: "#FFFFFF" property string textColor: "black"
property int fontSize: small ? 14 * scaleRatio : 16 * scaleRatio property int fontSize: small ? 14 * scaleRatio : 16 * scaleRatio
property int rectHeight: small ? 24 * scaleRatio : 28 * scaleRatio property int rectHeight: small ? 24 * scaleRatio : 28 * scaleRatio
property int rectHMargin: small ? 16 * scaleRatio : 22 * scaleRatio property int rectHMargin: small ? 16 * scaleRatio : 22 * scaleRatio
property alias text: inlineText.text property alias text: inlineText.text
property alias fontPixelSize: inlineText.font.pixelSize
property alias fontFamily: inlineText.font
property alias buttonColor: rect.color property alias buttonColor: rect.color
signal clicked() signal clicked()
@ -73,7 +75,7 @@ Item {
font.family: MoneroComponents.Style.fontBold.name font.family: MoneroComponents.Style.fontBold.name
font.bold: true font.bold: true
font.pixelSize: inlineButton.fontSize font.pixelSize: inlineButton.fontSize
color: "black" color: inlineButton.textColor
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }

View File

@ -1,4 +1,4 @@
// Copyright (c) 2014-2015, The Monero Project // Copyright (c) 2014-2019, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@ -201,8 +201,7 @@ ColumnLayout {
visible: (inlineButtonId.text || inlineButtonId.icon) && inlineButtonVisible ? true : false visible: (inlineButtonId.text || inlineButtonId.icon) && inlineButtonVisible ? true : false
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 8 * scaleRatio anchors.rightMargin: 8 * scaleRatio
anchors.top: parent.top anchors.verticalCenter: parent.verticalCenter
anchors.topMargin: 4 * scaleRatio
} }
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2019, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@ -306,7 +306,10 @@ Rectangle {
addressLine.text = clipboardText; addressLine.text = clipboardText;
} }
} }
inlineButton.icon: "../images/qr.png" inlineButton.text: FontAwesome.qrcode
inlineButton.fontPixelSize: 22
inlineButton.fontFamily: FontAwesome.fontFamily
inlineButton.textColor: MoneroComponents.Style.defaultFontColor
inlineButton.buttonColor: MoneroComponents.Style.orange inlineButton.buttonColor: MoneroComponents.Style.orange
inlineButton.onClicked: { inlineButton.onClicked: {
cameraUi.state = "Capture" cameraUi.state = "Capture"

View File

@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2019, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@ -33,6 +33,7 @@ import moneroComponents.Clipboard 1.0
import moneroComponents.PendingTransaction 1.0 import moneroComponents.PendingTransaction 1.0
import moneroComponents.Wallet 1.0 import moneroComponents.Wallet 1.0
import moneroComponents.NetworkType 1.0 import moneroComponents.NetworkType 1.0
import FontAwesome 1.0
import "../components" import "../components"
import "../components" as MoneroComponents import "../components" as MoneroComponents
import "." 1.0 import "." 1.0
@ -246,7 +247,10 @@ Rectangle {
addressLine.text = clipboardText; addressLine.text = clipboardText;
} }
} }
inlineButton.icon: "../images/qr.png" inlineButton.text: FontAwesome.qrcode
inlineButton.fontPixelSize: 22
inlineButton.fontFamily: FontAwesome.fontFamily
inlineButton.textColor: MoneroComponents.Style.defaultFontColor
inlineButton.buttonColor: MoneroComponents.Style.orange inlineButton.buttonColor: MoneroComponents.Style.orange
inlineButton.onClicked: { inlineButton.onClicked: {
cameraUi.state = "Capture" cameraUi.state = "Capture"

View File

@ -183,8 +183,6 @@
<file>components/RadioButton.qml</file> <file>components/RadioButton.qml</file>
<file>images/editIcon.png</file> <file>images/editIcon.png</file>
<file>images/editIcon@2x.png</file> <file>images/editIcon@2x.png</file>
<file>images/qr.png</file>
<file>images/qr@2x.png</file>
<file>pages/settings/Settings.qml</file> <file>pages/settings/Settings.qml</file>
<file>pages/settings/SettingsWallet.qml</file> <file>pages/settings/SettingsWallet.qml</file>
<file>pages/settings/SettingsNode.qml</file> <file>pages/settings/SettingsNode.qml</file>