CheckBox: use Font Awesome plus/minus icons, remove unused images

This commit is contained in:
xiphon
2019-11-25 05:52:13 +00:00
parent 2f5c47e95f
commit 0daf2aacf5
13 changed files with 24 additions and 22 deletions

View File

@@ -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;