big refactoring of API system

This commit is contained in:
Blue 2024-01-20 18:17:21 -03:00
parent 27124380e4
commit 7a116bfdf2
Signed by: blue
GPG key ID: 9B203B252A63EE38
37 changed files with 1060 additions and 534 deletions

View file

@ -4,23 +4,50 @@
import QtQuick
import QtQuick.Controls
Rectangle {
Item {
id: line
required property string title
required property string icon
required property color color
required property string balance
Row {
readonly property int iconSize: height
readonly property int freespace: width - iconSize - spacing * children.length - 1
anchors.fill: parent
IconLabel {
anchors.verticalCenter: parent.verticalCenter
icon.name: line.icon
width: parent.height
height: parent.height
spacing: 5
Rectangle {
width: parent.iconSize
height: parent.iconSize
color: line.color
IconLabel {
anchors.fill: parent
icon {
name: line.icon
width: width
height: height
}
}
}
Text {
anchors.verticalCenter: parent.verticalCenter
width: parent.freespace / 2
height: parent.height
text: title
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
}
}
}