2023-04-10 18:17:22 +08:00
|
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import QtQuick.Window
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import FluentUI
|
2023-04-27 09:38:57 +08:00
|
|
|
|
import "qrc:///example/qml/global/"
|
2023-04-22 16:02:52 +08:00
|
|
|
|
import "../component"
|
2023-04-10 18:17:22 +08:00
|
|
|
|
|
|
|
|
|
FluScrollablePage{
|
|
|
|
|
|
|
|
|
|
title:"Settings"
|
|
|
|
|
leftPadding:10
|
|
|
|
|
rightPadding:10
|
|
|
|
|
bottomPadding:20
|
|
|
|
|
spacing: 0
|
|
|
|
|
|
|
|
|
|
FluArea{
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 20
|
2023-04-19 23:53:00 +08:00
|
|
|
|
height: 136
|
2023-04-10 18:17:22 +08:00
|
|
|
|
paddings: 10
|
|
|
|
|
|
|
|
|
|
ColumnLayout{
|
|
|
|
|
spacing: 10
|
|
|
|
|
anchors{
|
2023-04-14 17:07:54 +08:00
|
|
|
|
top: parent.top
|
2023-04-10 18:17:22 +08:00
|
|
|
|
left: parent.left
|
|
|
|
|
}
|
|
|
|
|
FluText{
|
2023-04-19 23:53:00 +08:00
|
|
|
|
text:lang.dark_mode
|
2023-04-10 18:17:22 +08:00
|
|
|
|
fontStyle: FluText.BodyStrong
|
|
|
|
|
Layout.bottomMargin: 4
|
|
|
|
|
}
|
|
|
|
|
Repeater{
|
2023-04-19 23:53:00 +08:00
|
|
|
|
model: [{title:"System",mode:FluDarkMode.System},{title:"Light",mode:FluDarkMode.Light},{title:"Dark",mode:FluDarkMode.Dark}]
|
2023-04-10 18:17:22 +08:00
|
|
|
|
delegate: FluRadioButton{
|
2023-04-19 23:53:00 +08:00
|
|
|
|
selected : FluTheme.darkMode === modelData.mode
|
2023-04-10 18:17:22 +08:00
|
|
|
|
text:modelData.title
|
|
|
|
|
onClicked:{
|
2023-04-19 23:53:00 +08:00
|
|
|
|
FluTheme.darkMode = modelData.mode
|
2023-04-10 18:17:22 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-04-19 23:53:00 +08:00
|
|
|
|
|
|
|
|
|
|
2023-04-10 18:17:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2023-04-14 17:07:54 +08:00
|
|
|
|
|
|
|
|
|
FluArea{
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 20
|
2023-04-19 23:53:00 +08:00
|
|
|
|
height: 168
|
2023-04-14 17:07:54 +08:00
|
|
|
|
paddings: 10
|
|
|
|
|
|
|
|
|
|
ColumnLayout{
|
|
|
|
|
spacing: 10
|
|
|
|
|
anchors{
|
|
|
|
|
top: parent.top
|
|
|
|
|
left: parent.left
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluText{
|
2023-04-19 23:53:00 +08:00
|
|
|
|
text:lang.navigation_view_display_mode
|
2023-04-14 17:07:54 +08:00
|
|
|
|
fontStyle: FluText.BodyStrong
|
|
|
|
|
Layout.bottomMargin: 4
|
|
|
|
|
}
|
2023-04-19 23:53:00 +08:00
|
|
|
|
Repeater{
|
|
|
|
|
model: [{title:"Open",mode:FluNavigationView.Open},{title:"Compact",mode:FluNavigationView.Compact},{title:"Minimal",mode:FluNavigationView.Minimal},{title:"Auto",mode:FluNavigationView.Auto}]
|
|
|
|
|
delegate: FluRadioButton{
|
|
|
|
|
selected : MainEvent.displayMode===modelData.mode
|
|
|
|
|
text:modelData.title
|
|
|
|
|
onClicked:{
|
|
|
|
|
MainEvent.displayMode = modelData.mode
|
2023-04-14 17:07:54 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-19 22:27:27 +08:00
|
|
|
|
FluArea{
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 20
|
|
|
|
|
height: 80
|
|
|
|
|
paddings: 10
|
|
|
|
|
|
|
|
|
|
ColumnLayout{
|
|
|
|
|
spacing: 10
|
|
|
|
|
anchors{
|
|
|
|
|
top: parent.top
|
|
|
|
|
left: parent.left
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluText{
|
2023-04-19 23:53:00 +08:00
|
|
|
|
text:lang.locale
|
2023-04-19 22:27:27 +08:00
|
|
|
|
fontStyle: FluText.BodyStrong
|
|
|
|
|
Layout.bottomMargin: 4
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Flow{
|
|
|
|
|
spacing: 5
|
2023-04-19 23:53:00 +08:00
|
|
|
|
Repeater{
|
|
|
|
|
model: ["Zh","En"]
|
|
|
|
|
delegate: FluRadioButton{
|
|
|
|
|
selected : appInfo.lang.objectName === modelData
|
|
|
|
|
text:modelData
|
|
|
|
|
onClicked:{
|
|
|
|
|
console.debug(modelData)
|
|
|
|
|
appInfo.changeLang(modelData)
|
|
|
|
|
}
|
2023-04-19 22:27:27 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-10 18:17:22 +08:00
|
|
|
|
}
|