mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-26 21:41:11 +00:00
chore(Communities): Fees box - use danger outline for account selector when error
This commit is contained in:
parent
8524e37844
commit
3c65d2e69e
@ -12,6 +12,7 @@ Item {
|
|||||||
|
|
||||||
property alias control: comboBox
|
property alias control: comboBox
|
||||||
property alias model: comboBox.model
|
property alias model: comboBox.model
|
||||||
|
property alias count: comboBox.count
|
||||||
property alias delegate: comboBox.delegate
|
property alias delegate: comboBox.delegate
|
||||||
property alias contentItem: comboBox.contentItem
|
property alias contentItem: comboBox.contentItem
|
||||||
|
|
||||||
@ -20,6 +21,7 @@ Item {
|
|||||||
|
|
||||||
property alias label: labelItem.text
|
property alias label: labelItem.text
|
||||||
property alias validationError: validationErrorItem.text
|
property alias validationError: validationErrorItem.text
|
||||||
|
property bool forceError: false
|
||||||
|
|
||||||
property string popupContentItemObjectName: ""
|
property string popupContentItemObjectName: ""
|
||||||
property string indicatorIcon: "chevron-down"
|
property string indicatorIcon: "chevron-down"
|
||||||
@ -74,9 +76,14 @@ Item {
|
|||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: root.type === StatusComboBox.Type.Secondary ? "transparent" : Theme.palette.baseColor2
|
color: root.type === StatusComboBox.Type.Secondary ? "transparent" : Theme.palette.baseColor2
|
||||||
radius: 8
|
radius: 8
|
||||||
border.width: (!!root.validationError || comboBox.hovered || comboBox.down || comboBox.visualFocus || root.type === StatusComboBox.Type.Secondary) ? 1 : 0
|
border.width: (!!root.validationError || root.forceError
|
||||||
|
|| comboBox.hovered || comboBox.down
|
||||||
|
|| comboBox.visualFocus
|
||||||
|
|| root.type === StatusComboBox.Type.Secondary)
|
||||||
|
? 1 : 0
|
||||||
|
|
||||||
border.color: {
|
border.color: {
|
||||||
if (!!root.validationError)
|
if (!!root.validationError || root.forceError)
|
||||||
return Theme.palette.dangerColor1
|
return Theme.palette.dangerColor1
|
||||||
|
|
||||||
if (comboBox.visualFocus || comboBox.popup.opened)
|
if (comboBox.visualFocus || comboBox.popup.opened)
|
||||||
|
@ -87,6 +87,7 @@ Control {
|
|||||||
Layout.topMargin: Style.current.halfPadding
|
Layout.topMargin: Style.current.halfPadding
|
||||||
|
|
||||||
visible: root.showAccountsSelector
|
visible: root.showAccountsSelector
|
||||||
|
forceError: accountErrorText.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorText {
|
ErrorText {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user