This commit is contained in:
zhuzichu
2023-04-19 23:53:00 +08:00
parent 221afeea58
commit 51aef3f3ec
7 changed files with 76 additions and 46 deletions

View File

@ -9,7 +9,7 @@ Window {
Component.onCompleted: {
FluApp.init(app)
FluTheme.frameless = ("windows" === Qt.platform.os)
FluTheme.dark = false
FluTheme.darkMode = FluDarkMode.System
FluApp.routes = {
"/":"qrc:/page/MainPage.qml",
"/about":"qrc:/page/AboutPage.qml",

View File

@ -14,6 +14,39 @@ FluScrollablePage{
bottomPadding:20
spacing: 0
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 136
paddings: 10
ColumnLayout{
spacing: 10
anchors{
top: parent.top
left: parent.left
}
FluText{
text:lang.dark_mode
fontStyle: FluText.BodyStrong
Layout.bottomMargin: 4
}
Repeater{
model: [{title:"System",mode:FluDarkMode.System},{title:"Light",mode:FluDarkMode.Light},{title:"Dark",mode:FluDarkMode.Dark}]
delegate: FluRadioButton{
selected : FluTheme.darkMode === modelData.mode
text:modelData.title
onClicked:{
FluTheme.darkMode = modelData.mode
}
}
}
}
}
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
@ -32,9 +65,7 @@ FluScrollablePage{
fontStyle: FluText.BodyStrong
Layout.bottomMargin: 4
}
Repeater{
id: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
@ -45,7 +76,6 @@ FluScrollablePage{
}
}
}
}
FluArea{
@ -82,41 +112,6 @@ FluScrollablePage{
}
}
}
}
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
}
}
}
}
}
}