Add basic mod listing
This commit is contained in:
parent
ef25e8a026
commit
620acbeb30
1 changed files with 78 additions and 5 deletions
83
src/Main.qml
83
src/Main.qml
|
|
@ -7,11 +7,84 @@ Kirigami.ApplicationWindow {
|
|||
id: root
|
||||
title: "Leek"
|
||||
|
||||
pageStack.initialPage: Kirigami.Page {
|
||||
Controls.Label {
|
||||
anchors.centerIn: parent
|
||||
text: "Hello world"
|
||||
pageStack.initialPage: Kirigami.ScrollablePage {
|
||||
title: "Mods"
|
||||
Kirigami.CardsListView {
|
||||
id: modsView
|
||||
model: modListModel
|
||||
delegate: modCardDelegate
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: modCardDelegate
|
||||
Kirigami.AbstractCard {
|
||||
// headerOrientation: Qt.Horizontal
|
||||
contentItem: Item {
|
||||
implicitWidth: modCardLayout.implicitWidth
|
||||
implicitHeight: modCardLayout.implicitHeight
|
||||
GridLayout {
|
||||
id: modCardLayout
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
}
|
||||
rowSpacing: Kirigami.Units.largeSpacing
|
||||
columnSpacing: Kirigami.Units.largeSpacing
|
||||
columns: root.wideScreen ? 4 : 2
|
||||
|
||||
// TODO: Replace this with an image once we can get them
|
||||
Controls.BusyIndicator {
|
||||
running: true
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Kirigami.Heading {
|
||||
Layout.fillWidth: true
|
||||
text: name
|
||||
type: Kirigami.Heading.Type.Primary
|
||||
}
|
||||
Kirigami.Separator {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Controls.Label {
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
text: description ? description : "No description available"
|
||||
}
|
||||
}
|
||||
ColumnLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Controls.Switch {
|
||||
text: "Enabled"
|
||||
checked: true
|
||||
}
|
||||
Controls.Button {
|
||||
text: "Delete"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListModel {
|
||||
id: modListModel
|
||||
ListElement {
|
||||
name: "DivaNoSpy"
|
||||
description: "Disables project diva's telemetry"
|
||||
}
|
||||
ListElement {
|
||||
name: "exPatch"
|
||||
description: "Unlocks extreme difficulty immediately"
|
||||
}
|
||||
ListElement {
|
||||
name: "Mod with no description"
|
||||
}
|
||||
ListElement {
|
||||
name: "Very long description"
|
||||
description: "前奏で胸倉掴まれてサビでぶん殴られたわ、何このバイオレンス曲
|
||||
「初音ミクに決まってんだろ」とかこんな直球でボカロ主張してくる曲多くないから最高。誰か救急車呼んで(吐血)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue