diff --git a/components/StandardButton.qml b/components/StandardButton.qml
index 39ddc061..8f552ac7 100644
--- a/components/StandardButton.qml
+++ b/components/StandardButton.qml
@@ -34,8 +34,10 @@ import "../components" as MoneroComponents
Item {
id: button
property string rightIcon: ""
+ property string rightIconInactive: ""
property string icon: ""
property string textColor: button.enabled? MoneroComponents.Style.buttonTextColor: MoneroComponents.Style.buttonTextColorDisabled
+ property string textAlign: rightIcon !== "" ? "left" : "center"
property bool small: false
property alias text: label.text
property int fontSize: {
@@ -45,9 +47,21 @@ Item {
signal clicked()
// Dynamic height/width
- Layout.minimumWidth: (label.contentWidth > 50)? label.contentWidth + 22 : 60
- height: small ? 30 * scaleRatio : 36 * scaleRatio
+ Layout.minimumWidth: {
+ var _padding = 22;
+ if(button.rightIcon !== ""){
+ _padding += 60;
+ }
+ var _width = label.contentWidth + _padding;
+ if(_width <= 50) {
+ return 60;
+ }
+
+ return _width;
+ }
+
+ height: small ? 30 * scaleRatio : 36 * scaleRatio
function doClick() {
// Android workaround
@@ -87,7 +101,8 @@ Item {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: parent.right
- horizontalAlignment: Text.AlignHCenter
+ horizontalAlignment: textAlign === "center" ? Text.AlignHCenter : Text.AlignLeft
+ anchors.leftMargin: textAlign === "center" ? 0 : 11
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.pixelSize: buttonArea.pressed ? button.fontSize - 1 : button.fontSize
@@ -101,6 +116,21 @@ Item {
source: parent.icon
}
+ Image {
+ visible: parent.rightIcon !== ""
+ anchors.right: parent.right
+ anchors.rightMargin: 11 * scaleRatio
+ anchors.verticalCenter: parent.verticalCenter
+ width: parent.small ? 16 * scaleRatio : 20 * scaleRatio
+ height: parent.small ? 16 * scaleRatio : 20 * scaleRatio
+ source: {
+ if(parent.rightIconInactive !== "" && !parent.enabled){
+ return parent.rightIconInactive;
+ }
+ return parent.rightIcon;
+ }
+ }
+
MouseArea {
id: buttonArea
anchors.fill: parent
diff --git a/images/rightArrowInactive.png b/images/rightArrowInactive.png
new file mode 100755
index 00000000..09335c8a
Binary files /dev/null and b/images/rightArrowInactive.png differ
diff --git a/pages/Transfer.qml b/pages/Transfer.qml
index d572e315..0a339f98 100644
--- a/pages/Transfer.qml
+++ b/pages/Transfer.qml
@@ -329,7 +329,8 @@ Rectangle {
RowLayout {
StandardButton {
id: sendButton
- rightIcon: "../images/rightIcon.png"
+ rightIcon: "../images/rightArrow.png"
+ rightIconInactive: "../images/rightArrowInactive.png"
Layout.topMargin: 4 * scaleRatio
text: qsTr("Send") + translationManager.emptyString
// Send button is enabled when:
diff --git a/qml.qrc b/qml.qrc
index 8f00900f..42b868e6 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -205,5 +205,6 @@
js/TxUtils.js
images/warning.png
images/checkedBlackIcon.png
+ images/rightArrowInactive.png