chore(Communities): Fees box - add showAccountsSelector flag
It allows to show/hide selector without losing it's state.
This commit is contained in:
parent
7f27695f12
commit
8524e37844
|
@ -53,7 +53,10 @@ SplitView {
|
|||
width: 600
|
||||
|
||||
model: filteredModel
|
||||
accountsModel: accountsSwitch.checked ? accountsModel : null
|
||||
|
||||
accountsSelector.model: accountsModel
|
||||
showAccountsSelector: accountsSwitch.checked
|
||||
|
||||
placeholderText: placeholderTextField.text
|
||||
|
||||
totalFeeText: totalCheckBox.checked ?
|
||||
|
|
|
@ -16,7 +16,9 @@ Control {
|
|||
property bool showTotal: true
|
||||
property alias totalFeeText: feeTotalRow.feeText
|
||||
|
||||
property alias accountsModel: accountSelector.model
|
||||
readonly property alias accountsSelector: accountSelector
|
||||
property bool showAccountsSelector: true
|
||||
|
||||
property alias accountErrorText: accountErrorText.text
|
||||
|
||||
component Separator: Rectangle {
|
||||
|
@ -28,7 +30,6 @@ Control {
|
|||
}
|
||||
|
||||
component ErrorText: StatusBaseText {
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.current.halfPadding
|
||||
horizontalAlignment: Text.AlignRight
|
||||
|
@ -85,7 +86,7 @@ Control {
|
|||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.current.halfPadding
|
||||
|
||||
visible: !!model
|
||||
visible: root.showAccountsSelector
|
||||
}
|
||||
|
||||
ErrorText {
|
||||
|
|
|
@ -18,8 +18,11 @@ StatusGroupBox {
|
|||
// feeText (string)
|
||||
// error (bool), optional
|
||||
property alias model: feesBox.model
|
||||
readonly property alias count: feesBox.count
|
||||
|
||||
readonly property alias accountsSelector: footer.accountsSelector
|
||||
property alias showAccountsSelector: footer.showAccountsSelector
|
||||
|
||||
property alias accountsModel: footer.accountsModel
|
||||
property alias placeholderText: feesBox.placeholderText
|
||||
|
||||
property alias totalFeeText: footer.totalFeeText
|
||||
|
@ -43,8 +46,8 @@ StatusGroupBox {
|
|||
footer: FeesBoxFooter {
|
||||
id: footer
|
||||
|
||||
visible: !!accountsModel || showTotal
|
||||
|| root.generalErrorText || root.accountErrorText
|
||||
visible: feesBox.count && (root.showAccountsSelector || showTotal
|
||||
|| root.generalErrorText)
|
||||
|
||||
showTotal: feesBox.count > 1
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue