Add Launcher settings, rename AppLauncher to Launcher

This commit is contained in:
Ly-sec 2025-08-21 15:26:33 +02:00
parent ae332b3f82
commit fac816137a
9 changed files with 133 additions and 30 deletions

View file

@ -20,6 +20,7 @@ NPanel {
About,
AudioService,
Bar,
Launcher,
Brightness,
ColorScheme,
Display,
@ -38,6 +39,10 @@ NPanel {
id: generalTab
Tabs.GeneralTab {}
}
Component {
id: launcherTab
Tabs.LauncherTab {}
}
Component {
id: barTab
Tabs.BarTab {}
@ -94,6 +99,11 @@ NPanel {
"label": "Bar",
"icon": "web_asset",
"source": barTab
}, {
"id": SettingsPanel.Tab.Launcher,
"label": "Launcher",
"icon": "apps",
"source": launcherTab
}, {
"id": SettingsPanel.Tab.AudioService,
"label": "Audio",

View file

@ -133,7 +133,7 @@ ColumnLayout {
}
NToggle {
label: "Always show battery percentage"
label: "Show Battery Percentage"
description: "Show battery percentage at all times (otherwise only when charging or low)."
checked: Settings.data.bar.alwaysShowBatteryPercentage
onToggled: checked => {

View file

@ -0,0 +1,85 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import qs.Commons
import qs.Services
import qs.Widgets
ColumnLayout {
id: root
spacing: 0
ScrollView {
id: scrollView
Layout.fillWidth: true
Layout.fillHeight: true
padding: Style.marginM * scaling
clip: true
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AsNeeded
ColumnLayout {
width: scrollView.availableWidth
spacing: 0
Item {
Layout.fillWidth: true
Layout.preferredHeight: 0
}
ColumnLayout {
spacing: Style.marginL * scaling
Layout.fillWidth: true
NText {
text: "Launcher"
font.pointSize: Style.fontSizeXXL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
NToggle {
label: "Enable Clipboard History"
description: "Show clipboard history in the Launcher (command >clip)."
checked: Settings.data.appLauncher.enableClipboardHistory
onToggled: checked => {
Settings.data.appLauncher.enableClipboardHistory = checked
}
}
NDivider { Layout.fillWidth: true; Layout.topMargin: Style.marginL * scaling; Layout.bottomMargin: Style.marginS * scaling }
NText {
text: "Launcher Position"
font.pointSize: Style.fontSizeXXL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
Layout.bottomMargin: Style.marginS * scaling
}
NComboBox {
id: launcherPosition
label: "Position"
description: "Choose where the Launcher panel appears."
Layout.fillWidth: true
model: ListModel {
ListElement { key: "center"; name: "Center (default)" }
ListElement { key: "top_left"; name: "Top Left" }
ListElement { key: "top_right"; name: "Top Right" }
ListElement { key: "bottom_left"; name: "Bottom Left" }
ListElement { key: "bottom_right"; name: "Bottom Right" }
}
currentKey: Settings.data.appLauncher.position
onSelected: function(key) {
Settings.data.appLauncher.position = key
}
}
}
}
}
}