1
mirror of https://github.com/monero-project/monero-gui synced 2024-11-24 11:17:15 +01:00

Merge pull request #3635

cc8ddde Transfer: fix button colors, font size, bold; use secondary button for advanced options (rating89us)
This commit is contained in:
luigi1111 2021-11-26 22:47:35 -06:00
commit 97755e1b34
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
9 changed files with 36 additions and 26 deletions

View File

@ -37,27 +37,30 @@ RowLayout {
Layout.fillWidth: false
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
spacing: 4
RowLayout {
Layout.fillWidth: false
spacing: 12
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
StandardButton {
id: button1
small: true
primary: false
visible: button1.text
}
StandardButton {
id: button2
small: true
primary: false
visible: button2.text
}
StandardButton {
id: button3
small: true
primary: false
visible: button3.text
}
}

View File

@ -64,7 +64,7 @@ Item {
Rectangle{
id: rect
anchors.fill: parent
color: MoneroComponents.Style.buttonInlineBackgroundColor
color: buttonArea.containsMouse ? MoneroComponents.Style.buttonInlineBackgroundColorHover : MoneroComponents.Style.buttonInlineBackgroundColor
radius: 4
@ -101,13 +101,9 @@ Item {
}
onEntered: {
tooltip.text ? tooltip.tooltipPopup.open() : ""
rect.color = buttonColor ? buttonColor : "#707070";
rect.opacity = 0.8;
}
onExited: {
tooltip.text ? tooltip.tooltipPopup.close() : ""
rect.opacity = 1.0;
rect.color = buttonColor ? buttonColor : "#808080";
}
}
}

View File

@ -39,16 +39,12 @@ Item {
property bool primary: true
property string rightIcon: ""
property string rightIconInactive: ""
property color textColor: !button.enabled
? MoneroComponents.Style.buttonTextColorDisabled
: primary
? MoneroComponents.Style.buttonTextColor
: MoneroComponents.Style.buttonSecondaryTextColor;
property color textColor: primary ? MoneroComponents.Style.buttonTextColor : MoneroComponents.Style.buttonSecondaryTextColor;
property bool small: false
property alias text: label.text
property alias fontBold: label.font.bold
property int fontSize: {
if(small) return 14;
if(small) return 13.5;
else return 16;
}
property alias label: label
@ -72,6 +68,7 @@ Item {
anchors.fill: parent
radius: 3
border.width: parent.focus && parent.enabled ? 1 : 0
opacity: 1
state: button.enabled ? "active" : "disabled"
Component.onCompleted: state = state
@ -102,7 +99,14 @@ Item {
when: !button.enabled
PropertyChanges {
target: buttonRect
color: MoneroComponents.Style.buttonBackgroundColorDisabled
opacity: 0.5
color: primary
? MoneroComponents.Style.buttonBackgroundColor
: MoneroComponents.Style.buttonSecondaryBackgroundColor
}
PropertyChanges {
target: label
opacity: 0.5
}
}
]
@ -122,7 +126,7 @@ Item {
MoneroComponents.TextPlain {
id: label
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.bold: button.primary ? true : false
font.pixelSize: button.fontSize
color: !buttonArea.pressed ? button.textColor : "transparent"
visible: text !== ""
@ -145,6 +149,7 @@ Item {
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
width: button.small ? 16 : 20
height: button.small ? 16 : 20
opacity: buttonRect.opacity
source: {
if (fontAwesomeIcon) return "";
if(button.rightIconInactive !== "" && !button.enabled) {

View File

@ -42,11 +42,12 @@ QtObject {
property string buttonBackgroundColorDisabled: blackTheme ? _b_buttonBackgroundColorDisabled : _w_buttonBackgroundColorDisabled
property string buttonBackgroundColorDisabledHover: blackTheme ? _b_buttonBackgroundColorDisabledHover : _w_buttonBackgroundColorDisabledHover
property string buttonInlineBackgroundColor: blackTheme ? _b_buttonInlineBackgroundColor : _w_buttonInlineBackgroundColor
property string buttonInlineBackgroundColorHover: blackTheme ? _b_buttonInlineBackgroundColorHover : _w_buttonInlineBackgroundColorHover
property string buttonTextColor: blackTheme ? _b_buttonTextColor : _w_buttonTextColor
property string buttonTextColorDisabled: blackTheme ? _b_buttonTextColorDisabled : _w_buttonTextColorDisabled
property string buttonSecondaryBackgroundColor: "#d9d9d9"
property string buttonSecondaryBackgroundColorHover: "#a6a6a6"
property string buttonSecondaryTextColor: "#4d4d4d"
property string buttonSecondaryBackgroundColor: blackTheme ? _b_buttonSecondaryBackgroundColor : _w_buttonSecondaryBackgroundColor
property string buttonSecondaryBackgroundColorHover: blackTheme ? _b_buttonSecondaryBackgroundColorHover : _w_buttonSecondaryBackgroundColorHover
property string buttonSecondaryTextColor: blackTheme ? _b_buttonSecondaryTextColor : _w_buttonSecondaryTextColor
property string dividerColor: blackTheme ? _b_dividerColor : _w_dividerColor
property real dividerOpacity: blackTheme ? _b_dividerOpacity : _w_dividerOpacity
@ -102,8 +103,12 @@ QtObject {
property string _b_buttonBackgroundColorDisabled: "#707070"
property string _b_buttonBackgroundColorDisabledHover: "#808080"
property string _b_buttonInlineBackgroundColor: "#707070"
property string _b_buttonInlineBackgroundColorHover: "#808080"
property string _b_buttonTextColor: "white"
property string _b_buttonTextColorDisabled: "black"
property string _b_buttonSecondaryBackgroundColor: "#707070"
property string _b_buttonSecondaryBackgroundColorHover: "#808080"
property string _b_buttonSecondaryTextColor: "white"
property string _b_dividerColor: "white"
property real _b_dividerOpacity: 0.20
@ -158,9 +163,13 @@ QtObject {
property string _w_buttonBackgroundColorHover: "#E65E00"
property string _w_buttonBackgroundColorDisabled: "#bbbbbb"
property string _w_buttonBackgroundColorDisabledHover: "#D1D1D1"
property string _w_buttonInlineBackgroundColor: "#bbbbbb"
property string _w_buttonInlineBackgroundColor: "#d9d9d9"
property string _w_buttonInlineBackgroundColorHover: "#C8C8C8"
property string _w_buttonTextColor: "white"
property string _w_buttonTextColorDisabled: "black"
property string _w_buttonSecondaryBackgroundColor: "#d9d9d9"
property string _w_buttonSecondaryBackgroundColorHover: "#C8C8C8"
property string _w_buttonSecondaryTextColor: "#4d4d4d"
property string _w_dividerColor: "black"
property real _w_dividerOpacity: 0.20
@ -185,7 +194,7 @@ QtObject {
property string _w_menuButtonImageRightColorActive: "#FA6800"
property string _w_menuButtonImageRightColor: "#808080"
property string _w_menuButtonImageDotArrowSource: "qrc:///images/arrow-right-medium-white.png"
property string _w_inlineButtonTextColor: "black"
property string _w_inlineButtonTextColor: "#4d4d4d"
property string _w_inlineButtonBorderColor: "transparent"
property string _w_appWindowBackgroundColor: "black"
property string _w_appWindowBorderColor: "#dedede"

View File

@ -48,7 +48,7 @@ Rectangle {
Text {
id: icon
visible: tooltipIconVisible
color: MoneroComponents.Style.orange
color: MoneroComponents.Style.defaultFontColor
font.family: FontAwesome.fontFamily
font.pixelSize: 10
font.styleName: "Regular"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -855,7 +855,6 @@ Rectangle {
StandardButton {
id: sendButton
rightIcon: "qrc:///images/rightArrow.png"
rightIconInactive: "qrc:///images/rightArrowInactive.png"
Layout.topMargin: 4
text: qsTr("Send") + translationManager.emptyString
enabled: !sendButtonWarningBox.visible && !warningContent && !recipientModel.hasEmptyAddress() && !paymentIdWarningBox.visible

View File

@ -159,8 +159,6 @@
<file>js/TxUtils.js</file>
<file>images/warning.png</file>
<file>images/warning@2x.png</file>
<file>images/rightArrowInactive.png</file>
<file>images/rightArrowInactive@2x.png</file>
<file>js/Windows.js</file>
<file>js/Utils.js</file>
<file>components/RadioButton.qml</file>