mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-30 16:25:35 +00:00
d9d6d90dc9
- legacy Style and ThemePalette removed - moved and deduplicated font definitions into `Theme` (unrelated to a color palette) - `Style.current.foo` -> `Theme.foo` - `Style.current.fooColor` -> `Theme.palette.fooColor` - upgrade the imports to 5.15 - removed some mode dead components Fixes #16514
104 lines
2.3 KiB
QML
104 lines
2.3 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import StatusQ.Core 0.1
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import shared.controls 1.0
|
|
|
|
import utils 1.0
|
|
|
|
|
|
Control {
|
|
id: root
|
|
|
|
property alias generalErrorText: generalErrorText.text
|
|
|
|
property bool showTotal: true
|
|
property alias totalFeeText: feeTotalRow.feeText
|
|
|
|
readonly property alias accountsSelector: accountSelector
|
|
property bool showAccountsSelector: true
|
|
|
|
property alias accountErrorText: accountErrorText.text
|
|
|
|
required property string accountSelectorText
|
|
|
|
component Separator: Rectangle {
|
|
Layout.fillWidth: true
|
|
Layout.preferredHeight: 1
|
|
Layout.topMargin: Theme.padding
|
|
|
|
color: Theme.palette.baseColor2
|
|
}
|
|
|
|
component ErrorText: StatusBaseText {
|
|
Layout.fillWidth: true
|
|
Layout.topMargin: Theme.halfPadding
|
|
horizontalAlignment: Text.AlignRight
|
|
|
|
font.pixelSize: Theme.tertiaryTextFontSize
|
|
color: Theme.palette.dangerColor1
|
|
|
|
wrapMode: Text.Wrap
|
|
}
|
|
|
|
contentItem: ColumnLayout {
|
|
spacing: 0
|
|
|
|
ErrorText {
|
|
id: generalErrorText
|
|
|
|
visible: text !== ""
|
|
}
|
|
|
|
Separator {
|
|
visible: root.showTotal
|
|
}
|
|
|
|
FeeRow {
|
|
id: feeTotalRow
|
|
|
|
Layout.fillWidth: true
|
|
Layout.topMargin: Theme.padding
|
|
|
|
title: qsTr("Total")
|
|
highlightFee: true
|
|
visible: root.showTotal
|
|
}
|
|
|
|
Separator {
|
|
visible: accountSelector.visible
|
|
}
|
|
|
|
StatusBaseText {
|
|
Layout.topMargin: Theme.padding
|
|
Layout.fillWidth: true
|
|
|
|
visible: accountSelector.visible
|
|
text: root.accountSelectorText
|
|
color: Theme.palette.baseColor1
|
|
font.pixelSize: Theme.primaryTextFontSize
|
|
lineHeight: 1.2
|
|
wrapMode: Text.WordWrap
|
|
}
|
|
|
|
AccountSelector {
|
|
id: accountSelector
|
|
|
|
Layout.fillWidth: true
|
|
Layout.topMargin: Theme.halfPadding
|
|
|
|
visible: root.showAccountsSelector
|
|
forceError: accountErrorText.visible
|
|
}
|
|
|
|
ErrorText {
|
|
id: accountErrorText
|
|
|
|
visible: accountSelector.visible && text !== ""
|
|
}
|
|
}
|
|
}
|