some more experiments
This commit is contained in:
parent
9b7cea725f
commit
cdde0b9e2e
3 changed files with 48 additions and 100 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue