Skip to content

Commit

Permalink
Merge pull request monero-project#2489
Browse files Browse the repository at this point in the history
0daf2aa CheckBox: use Font Awesome plus/minus icons, remove unused images (xiphon)
  • Loading branch information
luigi1111 committed Nov 25, 2019
2 parents 380f218 + 0daf2aa commit 6c2c17a
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 22 deletions.
7 changes: 5 additions & 2 deletions components/CheckBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions components/effects/ImageMask.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
Binary file removed images/minus-white.png
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/plus-in-circle-medium-white.png
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
Binary file removed images/plus-white.png
Binary file not shown.
Binary file removed images/[email protected]
Binary file not shown.
6 changes: 4 additions & 2 deletions pages/Account.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import QtQuick.Controls 2.0
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.2
import FontAwesome 1.0

import "../components" as MoneroComponents
import "../components/effects/" as MoneroEffects
Expand Down Expand Up @@ -349,8 +350,9 @@ Rectangle {
id: addNewAccountCheckbox
visible: !selectAndSend
border: false
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
uncheckedIcon: FontAwesome.plusCircle
toggleOnClick: false
fontAwesomeIcons: true
fontSize: 16
iconOnTheLeft: true
Layout.fillWidth: true
Expand Down
5 changes: 3 additions & 2 deletions pages/AddressBook.qml
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,9 @@ Rectangle {
MoneroComponents.CheckBox {
id: addNewEntryCheckbox
border: false
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
uncheckedIcon: FontAwesome.plusCircle
toggleOnClick: false
fontAwesomeIcons: true
fontSize: 16
iconOnTheLeft: true
Layout.fillWidth: true
Expand Down
5 changes: 3 additions & 2 deletions pages/Receive.qml
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,9 @@ Rectangle {
MoneroComponents.CheckBox {
id: addNewAddressCheckbox
border: false
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
uncheckedIcon: FontAwesome.plusCircle
toggleOnClick: false
fontAwesomeIcons: true
fontSize: 16
iconOnTheLeft: true
Layout.fillWidth: true
Expand Down
10 changes: 6 additions & 4 deletions pages/Transfer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,9 @@ Rectangle {
CheckBox {
id: descriptionCheckbox
border: false
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
checkedIcon: FontAwesome.minusCircle
uncheckedIcon: FontAwesome.plusCircle
fontAwesomeIcons: true
fontSize: descriptionLine.labelFontSize
iconOnTheLeft: true
Layout.fillWidth: true
Expand All @@ -370,8 +371,9 @@ Rectangle {
CheckBox {
id: paymentIdCheckbox
border: false
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
checkedIcon: FontAwesome.minusCircle
uncheckedIcon: FontAwesome.plusCircle
fontAwesomeIcons: true
fontSize: paymentIdLine.labelFontSize
iconOnTheLeft: true
Layout.fillWidth: true
Expand Down
6 changes: 0 additions & 6 deletions qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
<file>images/[email protected]</file>
<file>images/external-link-white.png</file>
<file>images/[email protected]</file>
<file>images/minus-white.png</file>
<file>images/[email protected]</file>
<file>images/plus-white.png</file>
<file>images/[email protected]</file>
<file>components/Label.qml</file>
<file>components/SettingsListItem.qml</file>
<file>images/whatIsIcon.png</file>
Expand Down Expand Up @@ -174,8 +170,6 @@
<file>components/WarningBox.qml</file>
<file>images/miningxmr.png</file>
<file>images/[email protected]</file>
<file>images/plus-in-circle-medium-white.png</file>
<file>images/[email protected]</file>
<file>pages/merchant/Merchant.qml</file>
<file>pages/merchant/MerchantCheckbox.qml</file>
<file>pages/merchant/MerchantTrackingList.qml</file>
Expand Down

0 comments on commit 6c2c17a

Please sign in to comment.