96 lines
1.5 KiB
QML
96 lines
1.5 KiB
QML
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;
|
|
}
|
|
}
|
|
}
|
|
}
|