// SPDX-FileCopyrightText: 2023 Yury Gubich // SPDX-License-Identifier: GPL-3.0-or-later import QtQuick import QtQuick.Controls import QtQuick.Layouts import magpie Item { id: line required property string title required property string icon required property color color required property string balance required property string currency required property int assetID signal remove(id: int) signal edit(id: int) RowLayout { anchors.fill: parent spacing: 5 Rectangle { Layout.preferredWidth: parent.height Layout.fillHeight: true color: line.color Icon { anchors.fill: parent anchors.margins: 2 iconName: line.icon color: pickColor(line.color) } } Label { Layout.fillHeight: true Layout.preferredWidth: Infinity text: title verticalAlignment: Text.AlignVCenter font.bold: true } Label { Layout.fillHeight: true Layout.preferredWidth: Infinity text: balance verticalAlignment: Text.AlignVCenter } Label { 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 onClicked: edit(assetID) } Button { id: deleteButton Layout.fillHeight: true text: qsTr("Delete") icon.name: "delete" onClicked: remove(assetID) palette { //unfortunately doesn't work anymore button: "red" } } } }