Merge branch 'main' into open-panel-overlay-layer

This commit is contained in:
Damian D'Souza
2025-10-20 22:14:18 +02:00
committed by GitHub
43 changed files with 1567 additions and 412 deletions
@@ -17,7 +17,8 @@ ColumnLayout {
property bool valueShowIcon: widgetData.showIcon !== undefined ? widgetData.showIcon : widgetMetadata.showIcon
property string valueHideMode: "hidden" // Default to 'Hide When Empty'
property string valueScrollingMode: widgetData.scrollingMode || widgetMetadata.scrollingMode
property int valueWidth: widgetData.width !== undefined ? widgetData.width : widgetMetadata.width
property int valueMaxWidth: widgetData.maxWidth !== undefined ? widgetData.maxWidth : widgetMetadata.maxWidth
property bool valueUseFixedWidth: widgetData.useFixedWidth !== undefined ? widgetData.useFixedWidth : widgetMetadata.useFixedWidth
property bool valueColorizeIcons: widgetData.colorizeIcons !== undefined ? widgetData.colorizeIcons : widgetMetadata.colorizeIcons
Component.onCompleted: {
@@ -31,7 +32,8 @@ ColumnLayout {
settings.hideMode = valueHideMode
settings.showIcon = valueShowIcon
settings.scrollingMode = valueScrollingMode
settings.width = parseInt(widthInput.text) || widgetMetadata.width
settings.maxWidth = parseInt(widthInput.text) || widgetMetadata.maxWidth
settings.useFixedWidth = valueUseFixedWidth
settings.colorizeIcons = valueColorizeIcons
return settings
}
@@ -73,10 +75,18 @@ ColumnLayout {
NTextInput {
id: widthInput
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.active-window.width.label")
description: I18n.tr("bar.widget-settings.active-window.width.description")
placeholderText: widgetMetadata.width
text: valueWidth
label: I18n.tr("bar.widget-settings.active-window.max-width.label")
description: I18n.tr("bar.widget-settings.active-window.max-width.description")
placeholderText: widgetMetadata.maxWidth
text: valueMaxWidth
}
NToggle {
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.active-window.use-fixed-width.label")
description: I18n.tr("bar.widget-settings.active-window.use-fixed-width.description")
checked: valueUseFixedWidth
onToggled: checked => valueUseFixedWidth = checked
}
NComboBox {
@@ -19,6 +19,8 @@ ColumnLayout {
property bool valueShowVisualizer: widgetData.showVisualizer !== undefined ? widgetData.showVisualizer : widgetMetadata.showVisualizer
property string valueVisualizerType: widgetData.visualizerType || widgetMetadata.visualizerType
property string valueScrollingMode: widgetData.scrollingMode || widgetMetadata.scrollingMode
property int valueMaxWidth: widgetData.maxWidth !== undefined ? widgetData.maxWidth : widgetMetadata.maxWidth
property bool valueUseFixedWidth: widgetData.useFixedWidth !== undefined ? widgetData.useFixedWidth : widgetMetadata.useFixedWidth
Component.onCompleted: {
if (widgetData && widgetData.hideMode !== undefined) {
@@ -33,6 +35,8 @@ ColumnLayout {
settings.showVisualizer = valueShowVisualizer
settings.visualizerType = valueVisualizerType
settings.scrollingMode = valueScrollingMode
settings.maxWidth = parseInt(widthInput.text) || widgetMetadata.maxWidth
settings.useFixedWidth = valueUseFixedWidth
return settings
}
@@ -87,6 +91,22 @@ ColumnLayout {
minimumWidth: 200
}
NTextInput {
id: widthInput
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.media-mini.max-width.label")
description: I18n.tr("bar.widget-settings.media-mini.max-width.description")
placeholderText: widgetMetadata.maxWidth
text: valueMaxWidth
}
NToggle {
label: I18n.tr("bar.widget-settings.media-mini.use-fixed-width.label")
description: I18n.tr("bar.widget-settings.media-mini.use-fixed-width.description")
checked: valueUseFixedWidth
onToggled: checked => valueUseFixedWidth = checked
}
NComboBox {
label: I18n.tr("bar.widget-settings.media-mini.scrolling-mode.label")
description: I18n.tr("bar.widget-settings.media-mini.scrolling-mode.description")
+11
View File
@@ -26,6 +26,7 @@ NPanel {
Audio,
Bar,
ColorScheme,
LockScreen,
ControlCenter,
OSD,
Display,
@@ -118,6 +119,11 @@ NPanel {
id: userInterfaceTab
UserInterfaceTab {}
}
Component {
id: lockScreenTab
LockScreenTab {}
}
// Order *DOES* matter
function updateTabsModel() {
let newTabs = [{
@@ -150,6 +156,11 @@ NPanel {
"label": "settings.launcher.title",
"icon": "settings-launcher",
"source": launcherTab
}, {
"id": SettingsPanel.Tab.LockScreen,
"label": "settings.lock-screen.title",
"icon": "settings-lock-screen",
"source": lockScreenTab
}, {
"id": SettingsPanel.Tab.Audio,
"label": "settings.audio.title",
+112 -3
View File
@@ -13,6 +13,24 @@ ColumnLayout {
property var schemeColorsCache: ({})
property int cacheVersion: 0 // Increment to trigger UI updates
// Time dropdown options (00:00 .. 23:30)
ListModel {
id: timeOptions
}
Component.onCompleted: {
for (var h = 0; h < 24; h++) {
for (var m = 0; m < 60; m += 30) {
var hh = ("0" + h).slice(-2)
var mm = ("0" + m).slice(-2)
var key = hh + ":" + mm
timeOptions.append({
"key": key,
"name": key
})
}
}
}
spacing: Style.marginL
// Helper function to extract scheme name from path
@@ -138,20 +156,91 @@ ColumnLayout {
// Dark Mode Toggle
NToggle {
label: I18n.tr("settings.color-scheme.color-source.dark-mode.label")
description: I18n.tr("settings.color-scheme.color-source.dark-mode.description")
label: I18n.tr("settings.color-scheme.dark-mode.switch.label")
description: I18n.tr("settings.color-scheme.dark-mode.switch.description")
checked: Settings.data.colorSchemes.darkMode
enabled: true
onToggled: checked => {
Settings.data.colorSchemes.darkMode = checked
root.cacheVersion++ // Force UI update for dark/light variants
}
}
NComboBox {
label: I18n.tr("settings.color-scheme.dark-mode.mode.label")
description: I18n.tr("settings.color-scheme.dark-mode.mode.description")
model: [{
"name": I18n.tr("settings.color-scheme.dark-mode.mode.off"),
"key": "off"
}, {
"name": I18n.tr("settings.color-scheme.dark-mode.mode.manual"),
"key": "manual"
}, {
"name": I18n.tr("settings.color-scheme.dark-mode.mode.location"),
"key": "location"
}]
currentKey: Settings.data.colorSchemes.schedulingMode
onSelected: key => {
Settings.data.colorSchemes.schedulingMode = key
AppThemeService.generate()
}
}
// Manual scheduling
ColumnLayout {
spacing: Style.marginS
visible: Settings.data.colorSchemes.schedulingMode === "manual"
NLabel {
label: I18n.tr("settings.display.night-light.manual-schedule.label")
description: I18n.tr("settings.display.night-light.manual-schedule.description")
}
RowLayout {
Layout.fillWidth: false
spacing: Style.marginS
NText {
text: I18n.tr("settings.display.night-light.manual-schedule.sunrise")
pointSize: Style.fontSizeM
color: Color.mOnSurfaceVariant
}
NComboBox {
model: timeOptions
currentKey: Settings.data.colorSchemes.manualSunrise
placeholder: I18n.tr("settings.display.night-light.manual-schedule.select-start")
onSelected: key => Settings.data.colorSchemes.manualSunrise = key
minimumWidth: 120
}
Item {
Layout.preferredWidth: 20
}
NText {
text: I18n.tr("settings.display.night-light.manual-schedule.sunset")
pointSize: Style.fontSizeM
color: Color.mOnSurfaceVariant
}
NComboBox {
model: timeOptions
currentKey: Settings.data.colorSchemes.manualSunset
placeholder: I18n.tr("settings.display.night-light.manual-schedule.select-stop")
onSelected: key => Settings.data.colorSchemes.manualSunset = key
minimumWidth: 120
}
}
}
// Use Wallpaper Colors
NToggle {
label: I18n.tr("settings.color-scheme.color-source.use-wallpaper-colors.label")
description: I18n.tr("settings.color-scheme.color-source.use-wallpaper-colors.description")
enabled: ProgramCheckerService.matugenAvailable
checked: Settings.data.colorSchemes.useWallpaperColors
onToggled: checked => {
if (checked) {
@@ -575,6 +664,23 @@ ColumnLayout {
}
}
}
NCheckbox {
label: "Vicinae"
description: ProgramCheckerService.vicinaeAvailable ? I18n.tr("settings.color-scheme.templates.programs.vicinae.description", {
"filepath": "~/.local/share/vicinae/themes/matugen.toml"
}) : I18n.tr("settings.color-scheme.templates.programs.vicinae.description-missing", {
"app": "vicinae"
})
checked: Settings.data.templates.vicinae
enabled: ProgramCheckerService.vicinaeAvailable
opacity: ProgramCheckerService.vicinaeAvailable ? 1.0 : 0.6
onToggled: checked => {
if (ProgramCheckerService.vicinaeAvailable) {
Settings.data.templates.vicinae = checked
AppThemeService.generate()
}
}
}
}
// Miscellaneous
@@ -590,6 +696,9 @@ ColumnLayout {
checked: Settings.data.templates.enableUserTemplates
onToggled: checked => {
Settings.data.templates.enableUserTemplates = checked
if (checked) {
MatugenTemplates.writeUserTemplatesToml()
}
AppThemeService.generate()
}
}
+18
View File
@@ -87,6 +87,24 @@ ColumnLayout {
}
}
ColumnLayout {
spacing: Style.marginXXS
Layout.fillWidth: true
NLabel {
label: I18n.tr("settings.dock.appearance.icon-size.label")
description: I18n.tr("settings.dock.appearance.icon-size.description")
}
NValueSlider {
Layout.fillWidth: true
from: 0
to: 2
stepSize: 0.01
value: Settings.data.dock.size
onMoved: value => Settings.data.dock.size = value
text: Math.floor(Settings.data.dock.size * 100) + "%"
}
}
NToggle {
label: I18n.tr("settings.dock.monitors.only-same-output.label")
description: I18n.tr("settings.dock.monitors.only-same-output.description")
+50
View File
@@ -189,4 +189,54 @@ ColumnLayout {
Layout.topMargin: Style.marginXL
Layout.bottomMargin: Style.marginXL
}
// Language selection
ColumnLayout {
spacing: Style.marginL
Layout.fillWidth: true
NHeader {
label: I18n.tr("settings.general.language.section.label")
description: I18n.tr("settings.general.language.section.description")
}
NComboBox {
Layout.fillWidth: true
label: I18n.tr("settings.general.language.select.label")
description: I18n.tr("settings.general.language.select.description")
model: [{
"key": "",
"name": I18n.tr("settings.general.language.select.auto-detect") + " (" + I18n.systemDetectedLangCode + ")"
}].concat(I18n.availableLanguages.map(function (langCode) {
return {
"key": langCode,
"name": langCode
}
}))
currentKey: Settings.data.general.language
onSelected: key => {
Settings.data.general.language = key
if (key === "") {
I18n.detectLanguage() // Re-detect system language if "Automatic" is selected
} else {
I18n.setLanguage(key) // Set specific language
}
}
}
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginXL
Layout.bottomMargin: Style.marginXL
}
NButton {
visible: !DistroService.isNixOS
text: I18n.tr("settings.general.launch-setup-wizard")
onClicked: {
setupWizardLoader.active = false
setupWizardLoader.active = true
}
}
}
+31
View File
@@ -0,0 +1,31 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
import qs.Commons
import qs.Services
import qs.Widgets
ColumnLayout {
id: root
NToggle {
label: I18n.tr("settings.lock-screen.lock-on-suspend.label")
description: I18n.tr("settings.lock-screen.lock-on-suspend.description")
checked: Settings.data.general.lockOnSuspend
onToggled: Settings.data.general.lockOnSuspend = checked
}
NToggle {
label: I18n.tr("settings.lock-screen.compact-lockscreen.label")
description: I18n.tr("settings.lock-screen.compact-lockscreen.description")
checked: Settings.data.general.compactLockScreen
onToggled: checked => Settings.data.general.compactLockScreen = checked
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginXL
Layout.bottomMargin: Style.marginXL
}
}
@@ -33,13 +33,6 @@ ColumnLayout {
onToggled: checked => Settings.data.ui.tooltipsEnabled = checked
}
NToggle {
label: I18n.tr("settings.user-interface.compact-lockscreen.label")
description: I18n.tr("settings.user-interface.compact-lockscreen.description")
checked: Settings.data.general.compactLockScreen
onToggled: checked => Settings.data.general.compactLockScreen = checked
}
NToggle {
label: I18n.tr("settings.user-interface.panels-overlay.label")
description: I18n.tr("settings.user-interface.panels-overlay.description")