diff --git a/src/qml/SideBar.qml b/src/qml/SideBar.qml index ca160bc..9f157ff 100644 --- a/src/qml/SideBar.qml +++ b/src/qml/SideBar.qml @@ -48,25 +48,12 @@ Item { ListModel { id: listModel - ListElement { - title: qsTr("User") - name: "accounts" - page: "qrc:/qml/User/Main.qml" - iconSource: "accounts.svg" - } - - ListElement { - title: qsTr("Display") - name: "display" - page: "qrc:/qml/Display/Main.qml" - iconSource: "display.svg" - } - ListElement { title: qsTr("Network") name: "network" page: "qrc:/qml/Network/Main.qml" iconSource: "network.svg" + category: qsTr("Network and connection") } // ListElement { @@ -76,11 +63,20 @@ Item { // iconSource: "bluetooth.svg" // } + ListElement { + title: qsTr("Display") + name: "display" + page: "qrc:/qml/Display/Main.qml" + iconSource: "display.svg" + category: qsTr("Display and appearance") + } + ListElement { title: qsTr("Appearance") name: "appearance" page: "qrc:/qml/Appearance/Main.qml" iconSource: "appearance.svg" + category: qsTr("Display and appearance") } ListElement { @@ -88,6 +84,7 @@ Item { name: "background" page: "qrc:/qml/Wallpaper/Main.qml" iconSource: "wallpaper.svg" + category: qsTr("Display and appearance") } ListElement { @@ -95,6 +92,15 @@ Item { name: "dock" page: "qrc:/qml/Dock/Main.qml" iconSource: "dock.svg" + category: qsTr("Display and appearance") + } + + ListElement { + title: qsTr("User") + name: "accounts" + page: "qrc:/qml/User/Main.qml" + iconSource: "accounts.svg" + category: qsTr("System") } ListElement { @@ -102,6 +108,7 @@ Item { name: "language" page: "qrc:/qml/LanguagePage.qml" iconSource: "language.svg" + category: qsTr("System") } ListElement { @@ -109,6 +116,7 @@ Item { name: "battery" page: "qrc:/qml/Battery/Main.qml" iconSource: "battery.svg" + category: qsTr("System") } // ListElement { @@ -123,6 +131,7 @@ Item { name: "about" page: "qrc:/qml/About/Main.qml" iconSource: "about.svg" + category: qsTr("System") } } @@ -136,7 +145,7 @@ Item { clip: true model: listModel - spacing: FishUI.Units.smallSpacing * 1.5 + spacing: FishUI.Units.smallSpacing leftMargin: FishUI.Units.largeSpacing rightMargin: FishUI.Units.largeSpacing topMargin: FishUI.Units.largeSpacing @@ -152,6 +161,21 @@ Item { smooth: true } + section.property: "category" + section.delegate: Item { + width: ListView.view.width - ListView.view.leftMargin - ListView.view.rightMargin + height: FishUI.Units.fontMetrics.height + FishUI.Units.smallSpacing * 3 + + Text { + anchors.fill: parent + anchors.leftMargin: FishUI.Units.smallSpacing + anchors.topMargin: FishUI.Units.smallSpacing + anchors.bottomMargin: FishUI.Units.smallSpacing * 2 + color: FishUI.Theme.disabledTextColor + text: section + } + } + delegate: Item { id: item width: ListView.view.width - ListView.view.leftMargin - ListView.view.rightMargin @@ -182,7 +206,7 @@ Item { RowLayout { anchors.fill: parent anchors.leftMargin: FishUI.Units.largeSpacing - spacing: FishUI.Units.largeSpacing + spacing: FishUI.Units.smallSpacing * 1.5 Image { id: icon diff --git a/translations/en_US.ts b/translations/en_US.ts index 779c5b4..bf2a2a2 100644 --- a/translations/en_US.ts +++ b/translations/en_US.ts @@ -76,32 +76,32 @@ - + System Version - + System Type - + Kernel Version - + Processor - + RAM - + Internal Storage @@ -270,17 +270,17 @@ - + Enabled - + Scale - + Need to log in again to take effect @@ -320,7 +320,7 @@ - + Wired @@ -341,6 +341,11 @@ + Balance + + + + Performance @@ -378,47 +383,68 @@ SideBar - + User - + Display - + Network - - Appearance + + Network and connection + + + + Display and appearance + + + + + Appearance + + + + Background - + Dock - + + + + + System + + + + Language - + Battery - + About @@ -467,7 +493,7 @@ WifiView - + WLAN diff --git a/translations/zh_CN.ts b/translations/zh_CN.ts index 602342b..baed445 100644 --- a/translations/zh_CN.ts +++ b/translations/zh_CN.ts @@ -76,32 +76,32 @@ 关于 - + System Version 系统版本 - + System Type 系统类型 - + Kernel Version 内核版本 - + Processor 处理器 - + RAM 内存大小 - + Internal Storage 内部存储 @@ -270,17 +270,17 @@ 方向 - + Enabled 已开启 - + Scale 缩放 - + Need to log in again to take effect 需要重新登录才能生效 @@ -320,7 +320,7 @@ 网络 - + Wired 有线网络 @@ -341,6 +341,11 @@ + Balance + + + + Performance 性能模式 @@ -378,47 +383,68 @@ SideBar - + Display 显示 - + Network 网络 - + + Network and connection + 网络与连接 + + + + + + + Display and appearance + 显示与外观 + + + Appearance 外观 - + Dock 程序坞 - + User 用户 - + Background 背景 - + + + + + System + 系统 + + + Language 语言 - + Battery 电池 - + About 关于 @@ -467,7 +493,7 @@ WifiView - + WLAN WLAN