mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 08:17:59 +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 alias text: label.text
|
||||||
property string checkedIcon: "qrc:///images/check-white.svg"
|
property string checkedIcon: "qrc:///images/check-white.svg"
|
||||||
property string uncheckedIcon
|
property string uncheckedIcon
|
||||||
|
property bool fontAwesomeIcons: false
|
||||||
property int imgWidth: 13
|
property int imgWidth: 13
|
||||||
property int imgHeight: 13
|
property int imgHeight: 13
|
||||||
property bool toggleOnClick: true
|
property bool toggleOnClick: true
|
||||||
|
@ -89,9 +90,11 @@ Item {
|
||||||
width: checkBox.imgWidth
|
width: checkBox.imgWidth
|
||||||
height: checkBox.imgHeight
|
height: checkBox.imgHeight
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
fontAwesomeFallbackIcon: FontAwesome.plus
|
fontAwesomeFallbackIcon: checkBox.fontAwesomeIcons ? getIcon() : FontAwesome.plus
|
||||||
fontAwesomeFallbackSize: 14
|
fontAwesomeFallbackSize: 14
|
||||||
image: {
|
image: checkBox.fontAwesomeIcons ? "" : getIcon()
|
||||||
|
|
||||||
|
function getIcon() {
|
||||||
if (checkBox.checked || checkBox.uncheckedIcon == "")
|
if (checkBox.checked || checkBox.uncheckedIcon == "")
|
||||||
return checkBox.checkedIcon;
|
return checkBox.checkedIcon;
|
||||||
return checkBox.uncheckedIcon;
|
return checkBox.uncheckedIcon;
|
||||||
|
|
|
@ -39,7 +39,6 @@ Item {
|
||||||
id: root
|
id: root
|
||||||
property string image: ""
|
property string image: ""
|
||||||
property string color: ""
|
property string color: ""
|
||||||
property bool fontAwesomeFallbackEnabled: true
|
|
||||||
property var fontAwesomeFallbackIcon: ""
|
property var fontAwesomeFallbackIcon: ""
|
||||||
property string fontAwesomeFallbackFont: FontAwesome.fontFamilySolid
|
property string fontAwesomeFallbackFont: FontAwesome.fontFamilySolid
|
||||||
property string fontAwesomeFallbackStyle: "Solid"
|
property string fontAwesomeFallbackStyle: "Solid"
|
||||||
|
@ -69,13 +68,13 @@ Item {
|
||||||
anchors.fill: root
|
anchors.fill: root
|
||||||
source: svgMask
|
source: svgMask
|
||||||
color: root.color
|
color: root.color
|
||||||
visible: isOpenGL
|
visible: image && isOpenGL
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: fontAwesomeFallback
|
id: fontAwesomeFallback
|
||||||
visible: !isOpenGL && root.fontAwesomeFallback
|
visible: !imgMockColor.visible
|
||||||
text: !isOpenGL ? root.fontAwesomeFallbackIcon : ""
|
text: root.fontAwesomeFallbackIcon
|
||||||
font.family: root.fontAwesomeFallbackFont
|
font.family: root.fontAwesomeFallbackFont
|
||||||
font.pixelSize: root.fontAwesomeFallbackSize
|
font.pixelSize: root.fontAwesomeFallbackSize
|
||||||
font.styleName: root.fontAwesomeFallbackStyle
|
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.Controls.Styles 1.4
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
|
import FontAwesome 1.0
|
||||||
|
|
||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
import "../components/effects/" as MoneroEffects
|
import "../components/effects/" as MoneroEffects
|
||||||
|
@ -349,8 +350,9 @@ Rectangle {
|
||||||
id: addNewAccountCheckbox
|
id: addNewAccountCheckbox
|
||||||
visible: !selectAndSend
|
visible: !selectAndSend
|
||||||
border: false
|
border: false
|
||||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
uncheckedIcon: FontAwesome.plusCircle
|
||||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
toggleOnClick: false
|
||||||
|
fontAwesomeIcons: true
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
iconOnTheLeft: true
|
iconOnTheLeft: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -284,8 +284,9 @@ Rectangle {
|
||||||
MoneroComponents.CheckBox {
|
MoneroComponents.CheckBox {
|
||||||
id: addNewEntryCheckbox
|
id: addNewEntryCheckbox
|
||||||
border: false
|
border: false
|
||||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
uncheckedIcon: FontAwesome.plusCircle
|
||||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
toggleOnClick: false
|
||||||
|
fontAwesomeIcons: true
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
iconOnTheLeft: true
|
iconOnTheLeft: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -244,8 +244,9 @@ Rectangle {
|
||||||
MoneroComponents.CheckBox {
|
MoneroComponents.CheckBox {
|
||||||
id: addNewAddressCheckbox
|
id: addNewAddressCheckbox
|
||||||
border: false
|
border: false
|
||||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
uncheckedIcon: FontAwesome.plusCircle
|
||||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
toggleOnClick: false
|
||||||
|
fontAwesomeIcons: true
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
iconOnTheLeft: true
|
iconOnTheLeft: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -343,8 +343,9 @@ Rectangle {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: descriptionCheckbox
|
id: descriptionCheckbox
|
||||||
border: false
|
border: false
|
||||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
checkedIcon: FontAwesome.minusCircle
|
||||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
uncheckedIcon: FontAwesome.plusCircle
|
||||||
|
fontAwesomeIcons: true
|
||||||
fontSize: descriptionLine.labelFontSize
|
fontSize: descriptionLine.labelFontSize
|
||||||
iconOnTheLeft: true
|
iconOnTheLeft: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -370,8 +371,9 @@ Rectangle {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: paymentIdCheckbox
|
id: paymentIdCheckbox
|
||||||
border: false
|
border: false
|
||||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
checkedIcon: FontAwesome.minusCircle
|
||||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
uncheckedIcon: FontAwesome.plusCircle
|
||||||
|
fontAwesomeIcons: true
|
||||||
fontSize: paymentIdLine.labelFontSize
|
fontSize: paymentIdLine.labelFontSize
|
||||||
iconOnTheLeft: true
|
iconOnTheLeft: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
6
qml.qrc
6
qml.qrc
|
@ -7,10 +7,6 @@
|
||||||
<file>images/download-white@2x.png</file>
|
<file>images/download-white@2x.png</file>
|
||||||
<file>images/external-link-white.png</file>
|
<file>images/external-link-white.png</file>
|
||||||
<file>images/external-link-white@2x.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/Label.qml</file>
|
||||||
<file>components/SettingsListItem.qml</file>
|
<file>components/SettingsListItem.qml</file>
|
||||||
<file>images/whatIsIcon.png</file>
|
<file>images/whatIsIcon.png</file>
|
||||||
|
@ -174,8 +170,6 @@
|
||||||
<file>components/WarningBox.qml</file>
|
<file>components/WarningBox.qml</file>
|
||||||
<file>images/miningxmr.png</file>
|
<file>images/miningxmr.png</file>
|
||||||
<file>images/miningxmr@2x.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/Merchant.qml</file>
|
||||||
<file>pages/merchant/MerchantCheckbox.qml</file>
|
<file>pages/merchant/MerchantCheckbox.qml</file>
|
||||||
<file>pages/merchant/MerchantTrackingList.qml</file>
|
<file>pages/merchant/MerchantTrackingList.qml</file>
|
||||||
|
|
Loading…
Reference in a new issue