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
|
width: 600
|
||||||
|
|
||||||
model: filteredModel
|
model: filteredModel
|
||||||
accountsModel: accountsSwitch.checked ? accountsModel : null
|
|
||||||
|
accountsSelector.model: accountsModel
|
||||||
|
showAccountsSelector: accountsSwitch.checked
|
||||||
|
|
||||||
placeholderText: placeholderTextField.text
|
placeholderText: placeholderTextField.text
|
||||||
|
|
||||||
totalFeeText: totalCheckBox.checked ?
|
totalFeeText: totalCheckBox.checked ?
|
||||||
|
|
|
@ -16,7 +16,9 @@ Control {
|
||||||
property bool showTotal: true
|
property bool showTotal: true
|
||||||
property alias totalFeeText: feeTotalRow.feeText
|
property alias totalFeeText: feeTotalRow.feeText
|
||||||
|
|
||||||
property alias accountsModel: accountSelector.model
|
readonly property alias accountsSelector: accountSelector
|
||||||
|
property bool showAccountsSelector: true
|
||||||
|
|
||||||
property alias accountErrorText: accountErrorText.text
|
property alias accountErrorText: accountErrorText.text
|
||||||
|
|
||||||
component Separator: Rectangle {
|
component Separator: Rectangle {
|
||||||
|
@ -28,7 +30,6 @@ Control {
|
||||||
}
|
}
|
||||||
|
|
||||||
component ErrorText: StatusBaseText {
|
component ErrorText: StatusBaseText {
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Style.current.halfPadding
|
Layout.topMargin: Style.current.halfPadding
|
||||||
horizontalAlignment: Text.AlignRight
|
horizontalAlignment: Text.AlignRight
|
||||||
|
@ -85,7 +86,7 @@ Control {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Style.current.halfPadding
|
Layout.topMargin: Style.current.halfPadding
|
||||||
|
|
||||||
visible: !!model
|
visible: root.showAccountsSelector
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorText {
|
ErrorText {
|
||||||
|
|
|
@ -18,8 +18,11 @@ StatusGroupBox {
|
||||||
// feeText (string)
|
// feeText (string)
|
||||||
// error (bool), optional
|
// error (bool), optional
|
||||||
property alias model: feesBox.model
|
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 placeholderText: feesBox.placeholderText
|
||||||
|
|
||||||
property alias totalFeeText: footer.totalFeeText
|
property alias totalFeeText: footer.totalFeeText
|
||||||
|
@ -43,8 +46,8 @@ StatusGroupBox {
|
||||||
footer: FeesBoxFooter {
|
footer: FeesBoxFooter {
|
||||||
id: footer
|
id: footer
|
||||||
|
|
||||||
visible: !!accountsModel || showTotal
|
visible: feesBox.count && (root.showAccountsSelector || showTotal
|
||||||
|| root.generalErrorText || root.accountErrorText
|
|| root.generalErrorText)
|
||||||
|
|
||||||
showTotal: feesBox.count > 1
|
showTotal: feesBox.count > 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue