mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
CheckBox: use Font Awesome plus/minus icons, remove unused images
This commit is contained in:
parent
2f5c47e95f
commit
0daf2aacf5
13 changed files with 24 additions and 22 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 170 B |
Binary file not shown.
Before Width: | Height: | Size: 170 B |
Binary file not shown.
Before Width: | Height: | Size: 399 B |
Binary file not shown.
Before Width: | Height: | Size: 760 B |
Binary file not shown.
Before Width: | Height: | Size: 193 B |
Binary file not shown.
Before Width: | Height: | Size: 195 B |
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
|
6
qml.qrc
6
qml.qrc
|
@ -7,10 +7,6 @@
|
|||
<file>images/download-white@2x.png</file>
|
||||
<file>images/external-link-white.png</file>
|
||||
<file>images/external-link-white@2x.png</file>
|
||||
<file>images/minus-white.png</file>
|
||||
<file>images/minus-white@2x.png</file>
|
||||
<file>images/plus-white.png</file>
|
||||
<file>images/plus-white@2x.png</file>
|
||||
<file>components/Label.qml</file>
|
||||
<file>components/SettingsListItem.qml</file>
|
||||
<file>images/whatIsIcon.png</file>
|
||||
|
@ -174,8 +170,6 @@
|
|||
<file>components/WarningBox.qml</file>
|
||||
<file>images/miningxmr.png</file>
|
||||
<file>images/miningxmr@2x.png</file>
|
||||
<file>images/plus-in-circle-medium-white.png</file>
|
||||
<file>images/plus-in-circle-medium-white@2x.png</file>
|
||||
<file>pages/merchant/Merchant.qml</file>
|
||||
<file>pages/merchant/MerchantCheckbox.qml</file>
|
||||
<file>pages/merchant/MerchantTrackingList.qml</file>
|
||||
|
|
Loading…
Reference in a new issue