2023-04-10 18:17:22 +08:00
|
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import QtQuick.Window
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import FluentUI
|
|
|
|
|
import "qrc:///global/"
|
|
|
|
|
import "./component"
|
|
|
|
|
|
|
|
|
|
FluScrollablePage{
|
|
|
|
|
|
|
|
|
|
title:"Settings"
|
|
|
|
|
leftPadding:10
|
|
|
|
|
rightPadding:10
|
|
|
|
|
bottomPadding:20
|
|
|
|
|
spacing: 0
|
|
|
|
|
|
|
|
|
|
FluArea{
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 20
|
2023-04-10 22:07:30 +08:00
|
|
|
|
height: 168
|
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-14 17:07:54 +08:00
|
|
|
|
text:lang.navigation_view_display_mode
|
2023-04-10 18:17:22 +08:00
|
|
|
|
fontStyle: FluText.BodyStrong
|
|
|
|
|
Layout.bottomMargin: 4
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Repeater{
|
|
|
|
|
id:repeater
|
2023-04-10 22:05:20 +08:00
|
|
|
|
model: [{title:"Open",mode:FluNavigationView.Open},{title:"Compact",mode:FluNavigationView.Compact},{title:"Minimal",mode:FluNavigationView.Minimal},{title:"Auto",mode:FluNavigationView.Auto}]
|
2023-04-10 18:17:22 +08:00
|
|
|
|
delegate: FluRadioButton{
|
|
|
|
|
selected : MainEvent.displayMode===modelData.mode
|
|
|
|
|
text:modelData.title
|
|
|
|
|
onClicked:{
|
2023-04-14 17:07:54 +08:00
|
|
|
|
MainEvent.displayMode = modelData.mode
|
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 17:25:46 +08:00
|
|
|
|
height: 80
|
2023-04-14 17:07:54 +08:00
|
|
|
|
paddings: 10
|
|
|
|
|
|
|
|
|
|
ColumnLayout{
|
|
|
|
|
spacing: 10
|
|
|
|
|
anchors{
|
|
|
|
|
top: parent.top
|
|
|
|
|
left: parent.left
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluText{
|
|
|
|
|
text:lang.locale
|
|
|
|
|
fontStyle: FluText.BodyStrong
|
|
|
|
|
Layout.bottomMargin: 4
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Flow{
|
|
|
|
|
spacing: 5
|
|
|
|
|
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
|
|
|
|
FluArea{
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 20
|
|
|
|
|
height: 80
|
|
|
|
|
paddings: 10
|
|
|
|
|
|
|
|
|
|
ColumnLayout{
|
|
|
|
|
spacing: 10
|
|
|
|
|
anchors{
|
|
|
|
|
top: parent.top
|
|
|
|
|
left: parent.left
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluText{
|
|
|
|
|
text:lang.dark_mode
|
|
|
|
|
fontStyle: FluText.BodyStrong
|
|
|
|
|
Layout.bottomMargin: 4
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Flow{
|
|
|
|
|
spacing: 5
|
|
|
|
|
FluToggleSwitch{
|
|
|
|
|
text:lang.sys_dark_mode
|
|
|
|
|
selected:FluTheme.dark
|
|
|
|
|
onClicked:{
|
|
|
|
|
FluTheme.follow_system = true
|
|
|
|
|
FluTheme.dark = FluTheme.follow_system
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-10 18:17:22 +08:00
|
|
|
|
}
|