mirror of
https://github.com/redstrate/Auracite.git
synced 2025-04-25 22:07:45 +00:00
Overhaul Qt UI
Now it uses FormCard and looks much, much nicer.
This commit is contained in:
parent
d561bd3701
commit
10bb1c7f85
1 changed files with 53 additions and 11 deletions
|
@ -2,6 +2,7 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
import QtQuick.Controls as QQC2
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigamiaddons.formcard as FormCard
|
||||
import zone.xiv.auracite
|
||||
|
||||
Kirigami.ApplicationWindow {
|
||||
|
@ -11,20 +12,61 @@ Kirigami.ApplicationWindow {
|
|||
|
||||
readonly property Backend backend: Backend {}
|
||||
|
||||
ColumnLayout {
|
||||
QQC2.TextField {
|
||||
id: characterNameField
|
||||
pageStack.initialPage: Kirigami.Page {
|
||||
contentItem: ColumnLayout {
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
placeholderText: "Full name of the character"
|
||||
}
|
||||
spacing: Kirigami.Units.largeSpacing
|
||||
|
||||
QQC2.CheckBox {
|
||||
id: dalamudCheckbox
|
||||
}
|
||||
FormCard.FormCard {
|
||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||
|
||||
QQC2.Button {
|
||||
text: "Archive"
|
||||
onClicked: root.backend.archiveCharacter(characterNameField.text, dalamudCheckbox.checked)
|
||||
maximumWidth: Kirigami.Units.gridUnit * 20
|
||||
|
||||
FormCard.FormTextFieldDelegate {
|
||||
id: characterNameField
|
||||
label: i18n("Character Name")
|
||||
placeholderText: "Full name of the character"
|
||||
focus: true
|
||||
}
|
||||
|
||||
FormCard.FormDelegateSeparator {}
|
||||
|
||||
FormCard.FormCheckDelegate {
|
||||
id: dalamudCheckbox
|
||||
text: i18n("Use Dalamud Plugin")
|
||||
}
|
||||
|
||||
FormCard.FormDelegateSeparator {}
|
||||
|
||||
FormCard.FormButtonDelegate {
|
||||
id: loginButton
|
||||
text: i18nc("@action:button", "Archive")
|
||||
onClicked: root.backend.archiveCharacter(characterNameField.text, dalamudCheckbox.checked)
|
||||
}
|
||||
}
|
||||
|
||||
FormCard.FormCard {
|
||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||
|
||||
maximumWidth: Kirigami.Units.gridUnit * 20
|
||||
|
||||
FormCard.FormButtonDelegate {
|
||||
id: aboutButton
|
||||
text: i18nc("@action:button Application settings", "Settings")
|
||||
icon.name: "settings-configure"
|
||||
onClicked: applicationWindow().pageStack.layers.push(aboutPage)
|
||||
|
||||
Component {
|
||||
id: aboutPage
|
||||
FormCard.AboutPage {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue