debugging

This commit is contained in:
Blue 2024-01-18 19:14:33 -03:00
parent 6e16292f06
commit 27124380e4
Signed by: blue
GPG key ID: 9B203B252A63EE38
8 changed files with 76 additions and 52 deletions

View file

@ -3,16 +3,20 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import magpie.API
import magpie.Models as Models
import magpie.Components as Components
Item {
signal add
Column {
ColumnLayout {
id: column
anchors.fill: parent
Label {
id: label
text: "This is Assets screen"
font {
pixelSize: 24
@ -21,12 +25,12 @@ Item {
}
ListView {
anchors.centerIn: parent
model: API.assets
delegate: Rectangle {
Text {
text: title
}
id: listView
Layout.fillHeight: true
Layout.fillWidth: true
model: Models.Assets
delegate: Components.AssetLine {
height: 20
}
}
}

View file

@ -0,0 +1,26 @@
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick
import QtQuick.Controls
Rectangle {
id: line
required property string title
required property string icon
Row {
anchors.fill: parent
IconLabel {
anchors.verticalCenter: parent.verticalCenter
icon.name: line.icon
width: parent.height
height: parent.height
}
Text {
anchors.verticalCenter: parent.verticalCenter
text: title
}
}
}

View file

@ -10,6 +10,7 @@ qt_add_qml_module(magpieComponents
NO_PLUGIN
QML_FILES
Modal.qml
AssetLine.qml
)
target_link_libraries(magpie PRIVATE magpieComponents)

View file

@ -66,7 +66,7 @@ Item {
Button {
text: qsTr("Create")
onClicked: inner.send(titleField.text, titleField.text, colorField.text)
onClicked: inner.send(titleField.text, iconField.text, colorField.text)
}
}
@ -79,7 +79,7 @@ Item {
return;
titleField.text = title;
titleField.text = icon;
iconField.text = icon;
colorField.text = color;
modal.inProgress = true;