aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2019-11-25 05:52:13 +0000
committerxiphon <xiphon@protonmail.com>2019-11-25 06:37:21 +0000
commit0daf2aacf560b85e1c5660e8dc749ce98b96dc47 (patch)
tree0b6767c5a7b9dc8bcb458b6c979ce6b553e6eed1 /components
parent2f5c47e95fab6beec40e8c1dec7b74c75b931a0c (diff)
downloadmonzero-gui-0daf2aacf560b85e1c5660e8dc749ce98b96dc47.tar.gz
monzero-gui-0daf2aacf560b85e1c5660e8dc749ce98b96dc47.tar.xz
monzero-gui-0daf2aacf560b85e1c5660e8dc749ce98b96dc47.zip
CheckBox: use Font Awesome plus/minus icons, remove unused images
Diffstat (limited to 'components')
-rw-r--r--components/CheckBox.qml7
-rw-r--r--components/effects/ImageMask.qml7
2 files changed, 8 insertions, 6 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;
diff --git a/components/effects/ImageMask.qml b/components/effects/ImageMask.qml
index 4ac751ff..ea6d84c4 100644
--- a/components/effects/ImageMask.qml
+++ b/components/effects/ImageMask.qml
@@ -39,7 +39,6 @@ Item {
id: root
property string image: ""
property string color: ""
- property bool fontAwesomeFallbackEnabled: true
property var fontAwesomeFallbackIcon: ""
property string fontAwesomeFallbackFont: FontAwesome.fontFamilySolid
property string fontAwesomeFallbackStyle: "Solid"
@@ -69,13 +68,13 @@ Item {
anchors.fill: root
source: svgMask
color: root.color
- visible: isOpenGL
+ visible: image && isOpenGL
}
Text {
id: fontAwesomeFallback
- visible: !isOpenGL && root.fontAwesomeFallback
- text: !isOpenGL ? root.fontAwesomeFallbackIcon : ""
+ visible: !imgMockColor.visible
+ text: root.fontAwesomeFallbackIcon
font.family: root.fontAwesomeFallbackFont
font.pixelSize: root.fontAwesomeFallbackSize
font.styleName: root.fontAwesomeFallbackStyle