diff options
| author | xiphon <xiphon@protonmail.com> | 2020-09-24 14:08:33 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2020-09-24 14:32:52 +0000 |
| commit | be1f63f93d8f47f3af29722281282c82727856f4 (patch) | |
| tree | 3d5585382b722a5884f672e8ba3b290dfa279bad /components/StandardButton.qml | |
| parent | 98ce87a5722c6cd2c19e86f3d1fc316e827c05c9 (diff) | |
| download | monzero-gui-be1f63f93d8f47f3af29722281282c82727856f4.tar.gz monzero-gui-be1f63f93d8f47f3af29722281282c82727856f4.tar.xz monzero-gui-be1f63f93d8f47f3af29722281282c82727856f4.zip | |
PasswordDialog: configurable Ok btn text/icon, non-primary Cancel
Co-authored-by: rating89us <45968869+rating89us@users.noreply.github.com>
Diffstat (limited to 'components/StandardButton.qml')
| -rw-r--r-- | components/StandardButton.qml | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/components/StandardButton.qml b/components/StandardButton.qml index 5b4e2279..c69adb29 100644 --- a/components/StandardButton.qml +++ b/components/StandardButton.qml @@ -29,10 +29,13 @@ import QtQuick 2.9 import QtQuick.Layouts 1.1 +import FontAwesome 1.0 + import "../components" as MoneroComponents Item { id: button + property bool fontAwesomeIcon: false property bool primary: true property string rightIcon: "" property string rightIconInactive: "" @@ -135,7 +138,7 @@ Item { } Image { - visible: button.rightIcon !== "" + visible: !fontAwesomeIcon && button.rightIcon !== "" Layout.alignment: Qt.AlignVCenter | Qt.AlignRight width: button.small ? 16 : 20 height: button.small ? 16 : 20 @@ -146,6 +149,16 @@ Item { return button.rightIcon; } } + + Text { + Layout.alignment: Qt.AlignVCenter | Qt.AlignRight + color: MoneroComponents.Style.defaultFontColor + font.family: FontAwesome.fontFamilySolid + font.pixelSize: button.small ? 16 : 20 + font.styleName: "Solid" + text: button.rightIcon + visible: fontAwesomeIcon && button.rightIcon !== "" + } } MouseArea { |
