some more experiments

This commit is contained in:
Blue 2024-04-09 18:04:07 -03:00
parent 9b7cea725f
commit cdde0b9e2e
Signed by: blue
GPG key ID: 9B203B252A63EE38
3 changed files with 48 additions and 100 deletions

View file

@ -3,6 +3,7 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import magpie
@ -18,16 +19,13 @@ Item {
signal remove(id: int)
signal edit(id: int)
Row {
readonly property int iconSize: height
readonly property int freespace: width - deleteButton.width - editButton.width - iconSize - spacing * children.length - 1
RowLayout {
anchors.fill: parent
spacing: 5
Rectangle {
width: parent.iconSize
height: parent.iconSize
Layout.preferredWidth: parent.height
Layout.fillHeight: true
color: line.color
Icon {
@ -39,41 +37,41 @@ Item {
}
Label {
width: parent.freespace / 3
height: parent.height
Layout.fillHeight: true
Layout.preferredWidth: Infinity
text: title
verticalAlignment: Text.AlignVCenter
font.bold: true
}
Label {
width: parent.freespace / 3
height: parent.height
Layout.fillHeight: true
Layout.preferredWidth: Infinity
text: balance
verticalAlignment: Text.AlignVCenter
}
Label {
width: parent.freespace / 3
height: parent.height
Layout.fillHeight: true
Layout.preferredWidth: Infinity
text: currency
verticalAlignment: Text.AlignVCenter
}
Button {
id: editButton
Layout.fillHeight: true
text: qsTr("Edit")
icon.name: "entry-edit"
flat: true
height: parent.height
onClicked: edit(assetID)
}
Button {
id: deleteButton
Layout.fillHeight: true
text: qsTr("Delete")
icon.name: "delete"
height: parent.height
onClicked: remove(assetID)
palette { //unfortunately doesn't work anymore
button: "red"