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 model: comboBox.model
|
||||
property alias count: comboBox.count
|
||||
property alias delegate: comboBox.delegate
|
||||
property alias contentItem: comboBox.contentItem
|
||||
|
||||
|
@ -20,6 +21,7 @@ Item {
|
|||
|
||||
property alias label: labelItem.text
|
||||
property alias validationError: validationErrorItem.text
|
||||
property bool forceError: false
|
||||
|
||||
property string popupContentItemObjectName: ""
|
||||
property string indicatorIcon: "chevron-down"
|
||||
|
@ -74,9 +76,14 @@ Item {
|
|||
background: Rectangle {
|
||||
color: root.type === StatusComboBox.Type.Secondary ? "transparent" : Theme.palette.baseColor2
|
||||
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: {
|
||||
if (!!root.validationError)
|
||||
if (!!root.validationError || root.forceError)
|
||||
return Theme.palette.dangerColor1
|
||||
|
||||
if (comboBox.visualFocus || comboBox.popup.opened)
|
||||
|
|
|
@ -87,6 +87,7 @@ Control {
|
|||
Layout.topMargin: Style.current.halfPadding
|
||||
|
||||
visible: root.showAccountsSelector
|
||||
forceError: accountErrorText.visible
|
||||
}
|
||||
|
||||
ErrorText {
|
||||
|
|
Loading…
Reference in New Issue