Qml: add ModPage
This commit is contained in:
parent
d33d91c0be
commit
2ad0e0597c
1 changed files with 48 additions and 0 deletions
48
src/leek/qml/ModPage.qml
Normal file
48
src/leek/qml/ModPage.qml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls as Controls
|
||||
import org.kde.kirigami as Kirigami
|
||||
import Leek
|
||||
|
||||
Kirigami.Page {
|
||||
id: root
|
||||
required property QMod mod
|
||||
|
||||
title: "Local mod"
|
||||
|
||||
ColumnLayout {
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
// Leave a one pixel gap for the header separator
|
||||
Layout.topMargin: 1 - root.topPadding
|
||||
Layout.leftMargin: -root.leftPadding
|
||||
Layout.rightMargin: -root.rightPadding
|
||||
|
||||
implicitHeight: headerContents.implicitHeight + (headerContents.anchors.topMargin * 2)
|
||||
|
||||
color: "#804eb1"
|
||||
|
||||
GridLayout {
|
||||
id: headerContents
|
||||
ColumnLayout {
|
||||
Controls.Label {
|
||||
text: `Name: ${mod.name}`
|
||||
}
|
||||
Controls.Label {
|
||||
text: `Author placeholder`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Controls.Label {
|
||||
anchors.centerIn: parent
|
||||
text: `Hello from ${mod.name}`
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue