mirror of
https://github.com/redstrate/Auracite.git
synced 2025-04-28 23:27:44 +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.Layouts
|
||||||
import QtQuick.Controls as QQC2
|
import QtQuick.Controls as QQC2
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
|
import org.kde.kirigamiaddons.formcard as FormCard
|
||||||
import zone.xiv.auracite
|
import zone.xiv.auracite
|
||||||
|
|
||||||
Kirigami.ApplicationWindow {
|
Kirigami.ApplicationWindow {
|
||||||
|
@ -11,20 +12,61 @@ Kirigami.ApplicationWindow {
|
||||||
|
|
||||||
readonly property Backend backend: Backend {}
|
readonly property Backend backend: Backend {}
|
||||||
|
|
||||||
ColumnLayout {
|
pageStack.initialPage: Kirigami.Page {
|
||||||
QQC2.TextField {
|
contentItem: ColumnLayout {
|
||||||
id: characterNameField
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
placeholderText: "Full name of the character"
|
spacing: Kirigami.Units.largeSpacing
|
||||||
}
|
|
||||||
|
|
||||||
QQC2.CheckBox {
|
FormCard.FormCard {
|
||||||
id: dalamudCheckbox
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
}
|
|
||||||
|
|
||||||
QQC2.Button {
|
maximumWidth: Kirigami.Units.gridUnit * 20
|
||||||
text: "Archive"
|
|
||||||
onClicked: root.backend.archiveCharacter(characterNameField.text, dalamudCheckbox.checked)
|
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