async parsing + tex caching

This commit is contained in:
2026-08-26 02:06:10 +02:00
parent e18875a752
commit 3946541f87
32 changed files with 2730 additions and 489 deletions
+12 -7
View File
@@ -17,11 +17,14 @@ Item {
property int horizontalContentMargin
required property string icon
required property string label
property string subtext: ""
property bool open
property real openHeight: Math.min(rootParent.height * 0.8, 600)
property real openWidth: Math.min(rootParent.width * 0.8, 400)
required property Item rootParent
property bool separateContent
property bool first: false
property bool last: false
signal accepted
signal cancelled
@@ -44,8 +47,7 @@ Item {
color: root.open ? Colors.palette.m3surfaceContainerHighest : Colors.tPalette.m3surfaceContainer
Behavior on color {
CAnim {
}
CAnim {}
}
}
@@ -131,12 +133,13 @@ Item {
id: dialogBg
anchors.fill: parent
bottomLeftRadius: Tokens.rounding.largeIncreased
bottomRightRadius: Tokens.rounding.largeIncreased
bottomLeftRadius: root.last ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
bottomRightRadius: root.last ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
topRightRadius: root.first ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
topLeftRadius: root.first ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
deformScale: 0
group: blobGroup
opacity: blobGroup.color.a * (root.enabled ? 1 : 0.5)
radius: Tokens.rounding.extraSmall
}
RowButton {
@@ -145,9 +148,11 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
color: "transparent"
height: Math.min(implicitHeight, parent.height) // Clamp to parent height due to overshoot anim
height: Math.min(implicitHeight, parent.height)
icon: root.icon
last: true
subtext: root.subtext
last: root.last
first: root.first
text: root.label
transform: Matrix4x4 {
+29 -46
View File
@@ -11,6 +11,7 @@ import qs.Modules.Settings.Pages.Audio
import qs.Modules.Settings.Pages.Apps
import qs.Modules.Settings.Pages.Panels
import qs.Modules.Settings.Pages.Panels.Bar
import qs.Modules.Settings.Pages.Panels.Sidebar
import qs.Modules.Settings.Pages.Services
import qs.Services
@@ -23,13 +24,11 @@ QtObject {
// Wallpaper & style
StackPage {
Component {
WallpaperPage {
}
WallpaperPage {}
}
Component {
WallpaperSelect {
}
WallpaperSelect {}
}
}
},
@@ -37,32 +36,27 @@ QtObject {
// Screenshot
StackPage {
Component {
ScreenshotPage {
}
ScreenshotPage {}
}
}
},
// Connectivity
Component {
PlaceholderComp {
}
PlaceholderComp {}
},
Component {
PlaceholderComp {
}
PlaceholderComp {}
},
Component {
// Audio
StackPage {
Component {
AudioPage {
}
AudioPage {}
}
Component {
AppVolumes {
}
AppVolumes {}
}
}
},
@@ -71,49 +65,45 @@ QtObject {
Component {
StackPage {
Component {
PanelsPage {
}
PanelsPage {}
}
Component {
BarPanel {
}
BarPanel {}
}
Component {
DashboardPanel {
}
DashboardPanel {}
}
Component {
ResourcesPanel {
}
ResourcesPanel {}
}
Component {
LauncherPanel {
}
LauncherPanel {}
}
Component {
SidebarPanel {
}
SidebarPanel {}
}
// Bar sub pages
Component {
BarTray {
}
BarTray {}
}
Component {
BarStatusIcons {
}
BarStatusIcons {}
}
Component {
BarClock {
}
BarClock {}
}
// Sidebar sub pages
Component {
SidebarLlm {}
}
}
},
@@ -122,18 +112,15 @@ QtObject {
Component {
StackPage {
Component {
AppsPage {
}
AppsPage {}
}
Component {
AllApps {
}
AllApps {}
}
Component {
AppInfo {
}
AppInfo {}
}
}
},
@@ -142,13 +129,11 @@ QtObject {
Component {
StackPage {
Component {
ServicesPage {
}
ServicesPage {}
}
Component {
NotificationsPage {
}
NotificationsPage {}
}
}
},
@@ -157,15 +142,13 @@ QtObject {
Component {
StackPage {
Component {
AboutPage {
}
AboutPage {}
}
}
}
]
readonly property Component placeholderComp: Component {
PlaceholderComp {
}
PlaceholderComp {}
}
component PlaceholderComp: Item {
@@ -55,6 +55,7 @@ PageBase {
enabled: Object.keys(model).length > 0
header: qsTr("Add new entry")
icon: "add"
last: true
label: qsTr("Add entry")
model: {
const present = new Set(Config.bar.tray.statusIcons.values.map(item => item.id));
@@ -0,0 +1,95 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import ZShell.Config
import qs.Components
import qs.Modules.Settings.Common
PageBase {
id: root
readonly property var schemes: [
{
id: "oneDark",
label: qsTr("One Dark")
},
{
id: "nord",
label: qsTr("Nord")
},
{
id: "dracula",
label: qsTr("Dracula")
},
{
id: "githubDark",
label: qsTr("Github Dark")
},
{
id: "solarizedDark",
label: qsTr("Solarized Dark")
},
{
id: "monokai",
label: qsTr("Monokai")
},
{
id: "gruvboxDark",
label: qsTr("Gruvbox Dark")
},
{
id: "catppuccinMocha",
label: qsTr("Catppuccin Mocha")
},
{
id: "tokyoNight",
label: qsTr("Tokyo Night")
},
{
id: "ayuDark",
label: qsTr("Ayu Dark")
},
{
id: "palenight",
label: qsTr("Pale Night")
}
]
isSubPage: true
title: qsTr("Sidebar")
ColumnLayout {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
spacing: Tokens.spacing.extraSmall / 2
width: root.cappedWidth
SectionHeader {
first: true
text: qsTr("Appearance")
}
DialogSelectButton {
id: selectScheme
acceptLabel: qsTr("Confirm")
enabled: Object.keys(model).length > 0
header: qsTr("Select scheme")
first: true
last: true
icon: "add"
label: qsTr("Color scheme")
subtext: qsTr("Select the color scheme used for code blocks")
model: root.schemes
rootParent: root.flickable
onAccepted: {
if (!selectedItem)
return;
Config.llm.appearance.scheme = selectedItem;
}
}
}
}
@@ -89,6 +89,7 @@ PageBase {
header: qsTr("Add new entry")
icon: "add"
label: qsTr("Add entry")
last: true
model: {
const present = new Set(Config.utilities.quickToggles.values.map(item => item.id));
return Object.keys(root.builtinIcons).filter(id => !present.has(id)).map(id => ({
@@ -108,5 +109,18 @@ PageBase {
});
}
}
SectionHeader {
text: qsTr("AI chat")
}
NavRow {
text: qsTr("AI chat")
icon: "robot_2"
first: true
last: true
onClicked: root.sState.openSubPage(9)
}
}
}