From cc8ddde01be4460e6ae6364c9ac1118edabe03eb Mon Sep 17 00:00:00 2001 From: rating89us <45968869+rating89us@users.noreply.github.com> Date: Thu, 22 Jul 2021 20:47:12 +0200 Subject: [PATCH] Transfer: fix button colors, font size, bold; use secondary button for advanced options --- components/AdvancedOptionsItem.qml | 11 +++++++---- components/InlineButton.qml | 6 +----- components/StandardButton.qml | 21 +++++++++++++-------- components/Style.qml | 19 ++++++++++++++----- components/Tooltip.qml | 2 +- images/rightArrowInactive.png | Bin 1267 -> 0 bytes images/rightArrowInactive@2x.png | Bin 1659 -> 0 bytes pages/Transfer.qml | 1 - qml.qrc | 2 -- 9 files changed, 36 insertions(+), 26 deletions(-) delete mode 100644 images/rightArrowInactive.png delete mode 100644 images/rightArrowInactive@2x.png diff --git a/components/AdvancedOptionsItem.qml b/components/AdvancedOptionsItem.qml index 2f3c095a..d43944e8 100644 --- a/components/AdvancedOptionsItem.qml +++ b/components/AdvancedOptionsItem.qml @@ -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 } } diff --git a/components/InlineButton.qml b/components/InlineButton.qml index 09d3aadf..1983f29b 100644 --- a/components/InlineButton.qml +++ b/components/InlineButton.qml @@ -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"; } } } diff --git a/components/StandardButton.qml b/components/StandardButton.qml index b52b3a00..00fe0c89 100644 --- a/components/StandardButton.qml +++ b/components/StandardButton.qml @@ -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) { diff --git a/components/Style.qml b/components/Style.qml index 2edd555e..da739477 100644 --- a/components/Style.qml +++ b/components/Style.qml @@ -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" diff --git a/components/Tooltip.qml b/components/Tooltip.qml index 4709837e..595280da 100644 --- a/components/Tooltip.qml +++ b/components/Tooltip.qml @@ -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" diff --git a/images/rightArrowInactive.png b/images/rightArrowInactive.png deleted file mode 100644 index 426746961aefdd9c9da5dcce659b3a6ccd83d77e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1267 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqBDG7^O2qB1$5BeXNr6bM+Ea@{>~a zDsl^e@(c_%_7w$*$=RtT3Q4KynR&KK?|1K4QpilPRSGxtHSjHPPR+>ls47YguJQ{> zuF6ifOi{A8KQ26aVgjorKDK}xwt_!19`Se86_nJR{Hwo<>h+i#(Mch>H3D2mX`VkM*2oZ zx=P7{9OiaozEwNQn(g#_h548p8Tz$BE zfgHGxQ}ck{ECTvR%4_v2U@$djIy(mx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p7`6}stZ%m^zE*)d|SV>ikvIZs)u}-HZiwD&Zf^XRnM}9V{mqNE-NL{ z>!6zor#%(lA&A(B-hQoh~M(fp)K!e9RI#??8O53Pp+|x zhcCMz$?>4j-M{~RN~uTF#~V9Mutew^TpyHqbTzj@a?MELc3vN+FZT>uNEEdrh*R(v D`6k!( diff --git a/pages/Transfer.qml b/pages/Transfer.qml index 295db4fa..0aa14500 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -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 diff --git a/qml.qrc b/qml.qrc index d7e0ff37..1f6e7a36 100644 --- a/qml.qrc +++ b/qml.qrc @@ -159,8 +159,6 @@ js/TxUtils.js images/warning.png images/warning@2x.png - images/rightArrowInactive.png - images/rightArrowInactive@2x.png js/Windows.js js/Utils.js components/RadioButton.qml