aboutsummaryrefslogtreecommitdiff
path: root/components/CheckBox.qml
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-11-25 12:57:28 -0600
committerluigi1111 <luigi1111w@gmail.com>2019-11-25 12:57:28 -0600
commit6c2c17ada1e43d7d432567e5c1e29e7dbe63e20a (patch)
tree0962a7ebf5805ad52bf4afe3ccdb9c782ac26255 /components/CheckBox.qml
parent380f218b3a71711bb0a2203fc8bf61949eddd7b7 (diff)
parent0daf2aacf560b85e1c5660e8dc749ce98b96dc47 (diff)
downloadmonzero-gui-6c2c17ada1e43d7d432567e5c1e29e7dbe63e20a.tar.gz
monzero-gui-6c2c17ada1e43d7d432567e5c1e29e7dbe63e20a.tar.xz
monzero-gui-6c2c17ada1e43d7d432567e5c1e29e7dbe63e20a.zip
Merge pull request #2489
0daf2aa CheckBox: use Font Awesome plus/minus icons, remove unused images (xiphon)
Diffstat (limited to 'components/CheckBox.qml')
-rw-r--r--components/CheckBox.qml7
1 files changed, 5 insertions, 2 deletions
diff --git a/components/CheckBox.qml b/components/CheckBox.qml
index 99ea6416..4ef1aae8 100644
--- a/components/CheckBox.qml
+++ b/components/CheckBox.qml
@@ -38,6 +38,7 @@ Item {
property alias text: label.text
property string checkedIcon: "qrc:///images/check-white.svg"
property string uncheckedIcon
+ property bool fontAwesomeIcons: false
property int imgWidth: 13
property int imgHeight: 13
property bool toggleOnClick: true
@@ -89,9 +90,11 @@ Item {
width: checkBox.imgWidth
height: checkBox.imgHeight
color: MoneroComponents.Style.defaultFontColor
- fontAwesomeFallbackIcon: FontAwesome.plus
+ fontAwesomeFallbackIcon: checkBox.fontAwesomeIcons ? getIcon() : FontAwesome.plus
fontAwesomeFallbackSize: 14
- image: {
+ image: checkBox.fontAwesomeIcons ? "" : getIcon()
+
+ function getIcon() {
if (checkBox.checked || checkBox.uncheckedIcon == "")
return checkBox.checkedIcon;
return checkBox.uncheckedIcon;