2024-01-18 22:14:33 +00:00
|
|
|
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
2024-01-20 21:17:21 +00:00
|
|
|
Item {
|
2024-01-18 22:14:33 +00:00
|
|
|
id: line
|
|
|
|
required property string title
|
|
|
|
required property string icon
|
2024-01-20 21:17:21 +00:00
|
|
|
required property color color
|
|
|
|
required property string balance
|
2024-01-18 22:14:33 +00:00
|
|
|
|
|
|
|
Row {
|
2024-01-20 21:17:21 +00:00
|
|
|
readonly property int iconSize: height
|
|
|
|
readonly property int freespace: width - iconSize - spacing * children.length - 1
|
|
|
|
|
2024-01-18 22:14:33 +00:00
|
|
|
anchors.fill: parent
|
2024-01-20 21:17:21 +00:00
|
|
|
spacing: 5
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: parent.iconSize
|
|
|
|
height: parent.iconSize
|
|
|
|
color: line.color
|
|
|
|
|
|
|
|
IconLabel {
|
|
|
|
anchors.fill: parent
|
|
|
|
icon {
|
|
|
|
name: line.icon
|
|
|
|
width: width
|
|
|
|
height: height
|
|
|
|
}
|
|
|
|
}
|
2024-01-18 22:14:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
2024-01-20 21:17:21 +00:00
|
|
|
width: parent.freespace / 2
|
|
|
|
height: parent.height
|
2024-01-18 22:14:33 +00:00
|
|
|
text: title
|
2024-01-20 21:17:21 +00:00
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
color: palette.text
|
|
|
|
font.bold: true
|
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
|
|
|
width: parent.freespace / 2
|
|
|
|
height: parent.height
|
|
|
|
text: balance
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
color: palette.text
|
2024-01-18 22:14:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|