Spectral/qml/Setting.qml

66 lines
1.3 KiB
QML
Raw Normal View History

import QtQuick 2.9
2018-07-19 13:02:06 +00:00
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.2
2018-07-20 14:36:19 +00:00
import QtQuick.Layouts 1.3
import "component"
import "form"
2018-07-19 13:02:06 +00:00
Page {
property alias darkTheme: appearanceForm.darkTheme
property alias miniMode: appearanceForm.miniMode
2018-07-20 14:36:19 +00:00
property var connection
2018-07-19 13:02:06 +00:00
SettingAccountForm {
id: accountForm
parent: null
2018-07-20 04:14:02 +00:00
}
SettingAppearanceForm {
id: appearanceForm
parent: null
}
2018-07-20 04:14:02 +00:00
RowLayout {
ColumnLayout {
Material.elevation: 10
Layout.preferredWidth: 240
Layout.fillHeight: true
2018-07-20 04:14:02 +00:00
spacing: 0
2018-07-20 14:36:19 +00:00
ItemDelegate {
Layout.fillWidth: true
2018-07-20 14:36:19 +00:00
text: "Account"
onClicked: pushToStack(accountForm)
}
2018-07-20 14:36:19 +00:00
ItemDelegate {
Layout.fillWidth: true
2018-07-20 14:36:19 +00:00
text: "Appearance"
onClicked: pushToStack(appearanceForm)
}
2018-07-20 14:36:19 +00:00
ItemDelegate {
Layout.fillWidth: true
2018-07-20 14:36:19 +00:00
text: "About"
2018-07-20 14:36:19 +00:00
}
2018-07-20 04:14:02 +00:00
}
StackView {
Layout.fillWidth: true
Layout.fillHeight: true
2018-07-20 04:14:02 +00:00
id: settingStackView
2018-07-20 04:14:02 +00:00
}
}
2018-07-20 04:14:02 +00:00
function pushToStack(item) {
settingStackView.clear()
settingStackView.push(item)
2018-07-19 13:02:06 +00:00
}
}