Updated gen key button style. Fixes #1749

This commit is contained in:
staked-smart-ace 2021-01-25 19:51:37 +04:00 committed by Pascal Precht
parent 8cf669c3da
commit 262856d69e
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
2 changed files with 6 additions and 8 deletions

View File

@ -189,6 +189,7 @@ Item {
anchors.topMargin: 26
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 13
type: "secondary"
onClicked: {
setCurrentFlow(false);
onGenKeyClicked()

View File

@ -10,9 +10,10 @@ Button {
property string size: "large"
property string state: "default"
property color color: type === "warn" ? Style.current.danger : Style.current.buttonForegroundColor
property color bgColor: Style.current.buttonBackgroundColor
property color bgColor: type === "warn" ? Style.current.buttonWarnBackgroundColor : Style.current.buttonBackgroundColor
property color borderColor: color
property color bgHoverColor: Qt.darker(control.bgColor, 1.1)
property color bgHoverColor: bgColor !== Style.current.transparent ? Qt.darker(control.bgColor, 1.1) :
type === "warn" ? Style.current.buttonWarnBackgroundColor : Style.current.buttonBackgroundColor
property bool disableColorOverlay: false
property bool showBorder: false
property int iconRotation: 0
@ -105,12 +106,8 @@ Button {
if (type === "secondary") {
return hovered ? control.bgColor : "transparent"
}
return !enabled ? Style.current.buttonDisabledBackgroundColor :
hovered ?
type === "warn" ? Qt.darker(Style.current.buttonWarnBackgroundColor, 1.1) :
control.bgHoverColor :
type === "warn" ? Style.current.buttonWarnBackgroundColor :
control.bgColor
return !enabled ? (control.bgColor === Style.current.transparent ? control.bgColor : Style.current.buttonDisabledBackgroundColor) :
(hovered ? control.bgHoverColor : control.bgColor)
}
}