mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-16 15:58:11 +00:00
Transfer: fix button colors, font size, bold; use secondary button for advanced options
This commit is contained in:
parent
ecf5c501d6
commit
cc8ddde01b
9 changed files with 36 additions and 26 deletions
|
@ -37,27 +37,30 @@ RowLayout {
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: false
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: false
|
||||||
spacing: 12
|
spacing: 12
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: button1
|
id: button1
|
||||||
small: true
|
small: true
|
||||||
|
primary: false
|
||||||
visible: button1.text
|
visible: button1.text
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: button2
|
id: button2
|
||||||
small: true
|
small: true
|
||||||
|
primary: false
|
||||||
visible: button2.text
|
visible: button2.text
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: button3
|
id: button3
|
||||||
small: true
|
small: true
|
||||||
|
primary: false
|
||||||
visible: button3.text
|
visible: button3.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ Item {
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id: rect
|
id: rect
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: MoneroComponents.Style.buttonInlineBackgroundColor
|
color: buttonArea.containsMouse ? MoneroComponents.Style.buttonInlineBackgroundColorHover : MoneroComponents.Style.buttonInlineBackgroundColor
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,13 +101,9 @@ Item {
|
||||||
}
|
}
|
||||||
onEntered: {
|
onEntered: {
|
||||||
tooltip.text ? tooltip.tooltipPopup.open() : ""
|
tooltip.text ? tooltip.tooltipPopup.open() : ""
|
||||||
rect.color = buttonColor ? buttonColor : "#707070";
|
|
||||||
rect.opacity = 0.8;
|
|
||||||
}
|
}
|
||||||
onExited: {
|
onExited: {
|
||||||
tooltip.text ? tooltip.tooltipPopup.close() : ""
|
tooltip.text ? tooltip.tooltipPopup.close() : ""
|
||||||
rect.opacity = 1.0;
|
|
||||||
rect.color = buttonColor ? buttonColor : "#808080";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,16 +39,12 @@ Item {
|
||||||
property bool primary: true
|
property bool primary: true
|
||||||
property string rightIcon: ""
|
property string rightIcon: ""
|
||||||
property string rightIconInactive: ""
|
property string rightIconInactive: ""
|
||||||
property color textColor: !button.enabled
|
property color textColor: primary ? MoneroComponents.Style.buttonTextColor : MoneroComponents.Style.buttonSecondaryTextColor;
|
||||||
? MoneroComponents.Style.buttonTextColorDisabled
|
|
||||||
: primary
|
|
||||||
? MoneroComponents.Style.buttonTextColor
|
|
||||||
: MoneroComponents.Style.buttonSecondaryTextColor;
|
|
||||||
property bool small: false
|
property bool small: false
|
||||||
property alias text: label.text
|
property alias text: label.text
|
||||||
property alias fontBold: label.font.bold
|
property alias fontBold: label.font.bold
|
||||||
property int fontSize: {
|
property int fontSize: {
|
||||||
if(small) return 14;
|
if(small) return 13.5;
|
||||||
else return 16;
|
else return 16;
|
||||||
}
|
}
|
||||||
property alias label: label
|
property alias label: label
|
||||||
|
@ -72,6 +68,7 @@ Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 3
|
radius: 3
|
||||||
border.width: parent.focus && parent.enabled ? 1 : 0
|
border.width: parent.focus && parent.enabled ? 1 : 0
|
||||||
|
opacity: 1
|
||||||
|
|
||||||
state: button.enabled ? "active" : "disabled"
|
state: button.enabled ? "active" : "disabled"
|
||||||
Component.onCompleted: state = state
|
Component.onCompleted: state = state
|
||||||
|
@ -102,7 +99,14 @@ Item {
|
||||||
when: !button.enabled
|
when: !button.enabled
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: buttonRect
|
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 {
|
MoneroComponents.TextPlain {
|
||||||
id: label
|
id: label
|
||||||
font.family: MoneroComponents.Style.fontBold.name
|
font.family: MoneroComponents.Style.fontBold.name
|
||||||
font.bold: true
|
font.bold: button.primary ? true : false
|
||||||
font.pixelSize: button.fontSize
|
font.pixelSize: button.fontSize
|
||||||
color: !buttonArea.pressed ? button.textColor : "transparent"
|
color: !buttonArea.pressed ? button.textColor : "transparent"
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
|
@ -145,6 +149,7 @@ Item {
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||||
width: button.small ? 16 : 20
|
width: button.small ? 16 : 20
|
||||||
height: button.small ? 16 : 20
|
height: button.small ? 16 : 20
|
||||||
|
opacity: buttonRect.opacity
|
||||||
source: {
|
source: {
|
||||||
if (fontAwesomeIcon) return "";
|
if (fontAwesomeIcon) return "";
|
||||||
if(button.rightIconInactive !== "" && !button.enabled) {
|
if(button.rightIconInactive !== "" && !button.enabled) {
|
||||||
|
|
|
@ -42,11 +42,12 @@ QtObject {
|
||||||
property string buttonBackgroundColorDisabled: blackTheme ? _b_buttonBackgroundColorDisabled : _w_buttonBackgroundColorDisabled
|
property string buttonBackgroundColorDisabled: blackTheme ? _b_buttonBackgroundColorDisabled : _w_buttonBackgroundColorDisabled
|
||||||
property string buttonBackgroundColorDisabledHover: blackTheme ? _b_buttonBackgroundColorDisabledHover : _w_buttonBackgroundColorDisabledHover
|
property string buttonBackgroundColorDisabledHover: blackTheme ? _b_buttonBackgroundColorDisabledHover : _w_buttonBackgroundColorDisabledHover
|
||||||
property string buttonInlineBackgroundColor: blackTheme ? _b_buttonInlineBackgroundColor : _w_buttonInlineBackgroundColor
|
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 buttonTextColor: blackTheme ? _b_buttonTextColor : _w_buttonTextColor
|
||||||
property string buttonTextColorDisabled: blackTheme ? _b_buttonTextColorDisabled : _w_buttonTextColorDisabled
|
property string buttonTextColorDisabled: blackTheme ? _b_buttonTextColorDisabled : _w_buttonTextColorDisabled
|
||||||
property string buttonSecondaryBackgroundColor: "#d9d9d9"
|
property string buttonSecondaryBackgroundColor: blackTheme ? _b_buttonSecondaryBackgroundColor : _w_buttonSecondaryBackgroundColor
|
||||||
property string buttonSecondaryBackgroundColorHover: "#a6a6a6"
|
property string buttonSecondaryBackgroundColorHover: blackTheme ? _b_buttonSecondaryBackgroundColorHover : _w_buttonSecondaryBackgroundColorHover
|
||||||
property string buttonSecondaryTextColor: "#4d4d4d"
|
property string buttonSecondaryTextColor: blackTheme ? _b_buttonSecondaryTextColor : _w_buttonSecondaryTextColor
|
||||||
property string dividerColor: blackTheme ? _b_dividerColor : _w_dividerColor
|
property string dividerColor: blackTheme ? _b_dividerColor : _w_dividerColor
|
||||||
property real dividerOpacity: blackTheme ? _b_dividerOpacity : _w_dividerOpacity
|
property real dividerOpacity: blackTheme ? _b_dividerOpacity : _w_dividerOpacity
|
||||||
|
|
||||||
|
@ -102,8 +103,12 @@ QtObject {
|
||||||
property string _b_buttonBackgroundColorDisabled: "#707070"
|
property string _b_buttonBackgroundColorDisabled: "#707070"
|
||||||
property string _b_buttonBackgroundColorDisabledHover: "#808080"
|
property string _b_buttonBackgroundColorDisabledHover: "#808080"
|
||||||
property string _b_buttonInlineBackgroundColor: "#707070"
|
property string _b_buttonInlineBackgroundColor: "#707070"
|
||||||
|
property string _b_buttonInlineBackgroundColorHover: "#808080"
|
||||||
property string _b_buttonTextColor: "white"
|
property string _b_buttonTextColor: "white"
|
||||||
property string _b_buttonTextColorDisabled: "black"
|
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 string _b_dividerColor: "white"
|
||||||
property real _b_dividerOpacity: 0.20
|
property real _b_dividerOpacity: 0.20
|
||||||
|
|
||||||
|
@ -158,9 +163,13 @@ QtObject {
|
||||||
property string _w_buttonBackgroundColorHover: "#E65E00"
|
property string _w_buttonBackgroundColorHover: "#E65E00"
|
||||||
property string _w_buttonBackgroundColorDisabled: "#bbbbbb"
|
property string _w_buttonBackgroundColorDisabled: "#bbbbbb"
|
||||||
property string _w_buttonBackgroundColorDisabledHover: "#D1D1D1"
|
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_buttonTextColor: "white"
|
||||||
property string _w_buttonTextColorDisabled: "black"
|
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 string _w_dividerColor: "black"
|
||||||
property real _w_dividerOpacity: 0.20
|
property real _w_dividerOpacity: 0.20
|
||||||
|
|
||||||
|
@ -185,7 +194,7 @@ QtObject {
|
||||||
property string _w_menuButtonImageRightColorActive: "#FA6800"
|
property string _w_menuButtonImageRightColorActive: "#FA6800"
|
||||||
property string _w_menuButtonImageRightColor: "#808080"
|
property string _w_menuButtonImageRightColor: "#808080"
|
||||||
property string _w_menuButtonImageDotArrowSource: "qrc:///images/arrow-right-medium-white.png"
|
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_inlineButtonBorderColor: "transparent"
|
||||||
property string _w_appWindowBackgroundColor: "black"
|
property string _w_appWindowBackgroundColor: "black"
|
||||||
property string _w_appWindowBorderColor: "#dedede"
|
property string _w_appWindowBorderColor: "#dedede"
|
||||||
|
|
|
@ -48,7 +48,7 @@ Rectangle {
|
||||||
Text {
|
Text {
|
||||||
id: icon
|
id: icon
|
||||||
visible: tooltipIconVisible
|
visible: tooltipIconVisible
|
||||||
color: MoneroComponents.Style.orange
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
font.family: FontAwesome.fontFamily
|
font.family: FontAwesome.fontFamily
|
||||||
font.pixelSize: 10
|
font.pixelSize: 10
|
||||||
font.styleName: "Regular"
|
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 |
|
@ -855,7 +855,6 @@ Rectangle {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: sendButton
|
id: sendButton
|
||||||
rightIcon: "qrc:///images/rightArrow.png"
|
rightIcon: "qrc:///images/rightArrow.png"
|
||||||
rightIconInactive: "qrc:///images/rightArrowInactive.png"
|
|
||||||
Layout.topMargin: 4
|
Layout.topMargin: 4
|
||||||
text: qsTr("Send") + translationManager.emptyString
|
text: qsTr("Send") + translationManager.emptyString
|
||||||
enabled: !sendButtonWarningBox.visible && !warningContent && !recipientModel.hasEmptyAddress() && !paymentIdWarningBox.visible
|
enabled: !sendButtonWarningBox.visible && !warningContent && !recipientModel.hasEmptyAddress() && !paymentIdWarningBox.visible
|
||||||
|
|
2
qml.qrc
2
qml.qrc
|
@ -159,8 +159,6 @@
|
||||||
<file>js/TxUtils.js</file>
|
<file>js/TxUtils.js</file>
|
||||||
<file>images/warning.png</file>
|
<file>images/warning.png</file>
|
||||||
<file>images/warning@2x.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/Windows.js</file>
|
||||||
<file>js/Utils.js</file>
|
<file>js/Utils.js</file>
|
||||||
<file>components/RadioButton.qml</file>
|
<file>components/RadioButton.qml</file>
|
||||||
|
|
Loading…
Reference in a new issue