Settings + SetupWizard

- Added a Lock screen settings tabs
- Added button in settings/general tab to re-run the setup wizard
- Fixed missing translations
- Fixed bug when matugen not installed in setup wizard
- Added enabled property for NToggle
This commit is contained in:
ItsLemmy
2025-10-20 13:33:46 -04:00
parent 621b37cd1f
commit 73267d1d37
14 changed files with 138 additions and 148 deletions
+13 -15
View File
@@ -32,16 +32,6 @@
"reset": "Eckenradius des Bildschirms zurücksetzen"
}
},
"lockscreen": {
"section": {
"label": "Sperrbildschirm",
"description": "Hier kannst du deinen Sperrbildschirm konfigurieren."
},
"lock-on-suspend": {
"label": "Beim Standby sperren",
"description": "Bildschirm automatisch sperren, wenn das System in den Standby-Modus wechselt."
}
},
"fonts": {
"section": {
"label": "Schriftarten",
@@ -79,7 +69,8 @@
"description": "Wählen die in der Anwendungsoberfläche verwendete Sprache.",
"auto-detect": "Automatisch"
}
}
},
"launch-setup-wizard": "Starte den Setup-Assistenten"
},
"audio": {
"title": "Audio",
@@ -802,10 +793,6 @@
"label": "Eckenradius",
"reset": "Rahmenradius zurücksetzen"
},
"compact-lockscreen": {
"description": "Zeige nur die Login-Eingabe und Systemsteuerung, blende Wetter- und Medien-Widgets aus.",
"label": "Kompakter Sperrbildschirm"
},
"dim-desktop": {
"description": "Den Desktop abdunkeln, wenn Bedienfelder oder Menüs geöffnet sind.",
"label": "Dim Desktop"
@@ -824,6 +811,17 @@
"description": "Tooltips in der gesamten Benutzeroberfläche aktivieren oder deaktivieren.",
"label": "Tooltips anzeigen"
}
},
"lock-screen": {
"compact-lockscreen": {
"description": "Zeige nur die Login-Eingabe und Systemsteuerung, blende Wetter- und Medien-Widgets aus.",
"label": "Kompakter Sperrbildschirm"
},
"lock-on-suspend": {
"description": "Den Bildschirm beim Suspendieren des Systems automatisch sperren.",
"label": "Sperren beim Ruhezustand"
},
"title": "Sperrbildschirm"
}
},
"general": {
+12 -14
View File
@@ -2,6 +2,7 @@
"settings": {
"general": {
"title": "General",
"launch-setup-wizard": "Launch the setup wizard",
"profile": {
"section": {
"label": "Profile",
@@ -32,16 +33,6 @@
"reset": "Reset screen corners radius"
}
},
"lockscreen": {
"section": {
"label": "Lock screen",
"description": "Configure lock screen behavior."
},
"lock-on-suspend": {
"label": "Lock on suspend",
"description": "Automatically lock the screen when suspending the system."
}
},
"fonts": {
"reset-scaling": "Reset scaling",
"section": {
@@ -806,10 +797,6 @@
"label": "Dim desktop",
"description": "Dim the desktop when panels or menus are open."
},
"compact-lockscreen": {
"label": "Compact lock screen",
"description": "Show only the login input and system controls, hiding weather and media widgets."
},
"border-radius": {
"label": "Border radius",
"description": "Controls the corner roundness of windows, buttons, and other elements.",
@@ -824,6 +811,17 @@
"label": "Disable UI Animations",
"description": "Disable all animations for a faster, more responsive experience."
}
},
"lock-screen": {
"title": "Lock screen",
"compact-lockscreen": {
"label": "Compact lock screen",
"description": "Show only the login input and system controls, hiding weather and media widgets."
},
"lock-on-suspend": {
"label": "Lock on suspend",
"description": "Automatically lock the screen when suspending the system."
}
}
},
"widgets": {
+13 -15
View File
@@ -32,16 +32,6 @@
"reset": "Restablecer el radio de las esquinas de la pantalla"
}
},
"lockscreen": {
"section": {
"label": "Pantalla de bloqueo",
"description": "Configura el comportamiento de la pantalla de bloqueo."
},
"lock-on-suspend": {
"label": "Bloquear al suspender",
"description": "Bloquear automáticamente la pantalla al suspender el sistema."
}
},
"fonts": {
"section": {
"label": "Fuentes",
@@ -79,7 +69,8 @@
"description": "Selecciona el idioma utilizado en la interfaz de la aplicación.",
"auto-detect": "Automático"
}
}
},
"launch-setup-wizard": "Inicie el asistente de configuración"
},
"audio": {
"title": "Audio",
@@ -802,10 +793,6 @@
"label": "Radio de borde",
"reset": "Restablecer el radio del borde"
},
"compact-lockscreen": {
"description": "Mostrar solo el campo de inicio de sesión y los controles del sistema, ocultando los widgets del clima y multimedia.",
"label": "Pantalla de bloqueo compacta"
},
"dim-desktop": {
"description": "Atenuar el escritorio cuando los paneles o menús estén abiertos.",
"label": "Dim escritorio"
@@ -824,6 +811,17 @@
"description": "Activar o desactivar los avisos emergentes en toda la interfaz.",
"label": "Mostrar sugerencias"
}
},
"lock-screen": {
"compact-lockscreen": {
"description": "Mostrar solo el campo de inicio de sesión y los controles del sistema, ocultando los widgets del clima y multimedia.",
"label": "Pantalla de bloqueo compacta"
},
"lock-on-suspend": {
"description": "Bloquear la pantalla automáticamente al suspender el sistema.",
"label": "Bloquear al suspender"
},
"title": "Pantalla de bloqueo"
}
},
"widgets": {
+13 -15
View File
@@ -32,16 +32,6 @@
"reset": "Réinitialiser le rayon des coins de l'écran"
}
},
"lockscreen": {
"section": {
"label": "Écran de verrouillage",
"description": "Configurer le comportement de l'écran de verrouillage."
},
"lock-on-suspend": {
"label": "Verrouiller lors de la suspension",
"description": "Verrouiller automatiquement l'écran lors de la mise en veille du système."
}
},
"fonts": {
"section": {
"label": "Polices",
@@ -79,7 +69,8 @@
"description": "Sélectionnez la langue utilisée dans l'interface de l'application.",
"auto-detect": "Automatique"
}
}
},
"launch-setup-wizard": "Lancer l'assistant d'installation"
},
"audio": {
"title": "Audio",
@@ -802,10 +793,6 @@
"label": "Rayon de bordure",
"reset": "Réinitialiser le rayon de la bordure"
},
"compact-lockscreen": {
"description": "Afficher uniquement le champ de saisie de connexion et les commandes système, en masquant les widgets météo et multimédia.",
"label": "Écran de verrouillage compact"
},
"dim-desktop": {
"description": "Atténuer le bureau lorsque des panneaux ou des menus sont ouverts.",
"label": "Dim bureau"
@@ -824,6 +811,17 @@
"description": "Activer ou désactiver les info-bulles dans toute l'interface.",
"label": "Afficher les infobulles"
}
},
"lock-screen": {
"compact-lockscreen": {
"description": "Afficher uniquement le champ de saisie de connexion et les commandes système, en masquant les widgets météo et multimédia.",
"label": "Écran de verrouillage compact"
},
"lock-on-suspend": {
"description": "Verrouiller automatiquement l'écran lors de la mise en veille du système.",
"label": "Verrouiller à la suspension"
},
"title": "Écran de verrouillage"
}
},
"widgets": {
+13 -15
View File
@@ -32,16 +32,6 @@
"reset": "Redefinir raio dos cantos da tela"
}
},
"lockscreen": {
"section": {
"label": "Tela de bloqueio",
"description": "Configure o comportamento da tela de bloqueio."
},
"lock-on-suspend": {
"label": "Bloquear ao suspender",
"description": "Bloquear automaticamente a tela ao suspender o sistema."
}
},
"fonts": {
"section": {
"label": "Fontes",
@@ -79,7 +69,8 @@
"description": "Selecione o idioma usado na interface da aplicação.",
"auto-detect": "Automático"
}
}
},
"launch-setup-wizard": "Iniciar o assistente de configuração"
},
"audio": {
"title": "Áudio",
@@ -802,10 +793,6 @@
"label": "Raio da borda",
"reset": "Redefinir raio da borda"
},
"compact-lockscreen": {
"description": "Mostrar apenas a entrada de login e os controles do sistema, ocultando widgets de clima e mídia.",
"label": "Tela de bloqueio compacta"
},
"dim-desktop": {
"description": "Escurecer a área de trabalho quando painéis ou menus estiverem abertos.",
"label": "Dim área de trabalho"
@@ -824,6 +811,17 @@
"description": "Ativar ou desativar dicas de ferramentas em toda a interface.",
"label": "Mostrar dicas de ferramenta"
}
},
"lock-screen": {
"compact-lockscreen": {
"description": "Mostrar apenas a entrada de login e os controles do sistema, ocultando os widgets de clima e mídia.",
"label": "Tela de bloqueio compacta"
},
"lock-on-suspend": {
"description": "Bloquear a tela automaticamente ao suspender o sistema.",
"label": "Bloquear ao suspender"
},
"title": "Tela de bloqueio"
}
},
"widgets": {
+13 -15
View File
@@ -32,16 +32,6 @@
"reset": "重置屏幕圆角半径"
}
},
"lockscreen": {
"section": {
"label": "锁屏",
"description": "配置锁屏行为。"
},
"lock-on-suspend": {
"label": "挂起时锁定",
"description": "在系统挂起时自动锁定屏幕。"
}
},
"fonts": {
"reset-scaling": "恢复默认缩放",
"section": {
@@ -79,7 +69,8 @@
"description": "选择应用程序界面中使用的语言。",
"auto-detect": "自动检测"
}
}
},
"launch-setup-wizard": "启动安装向导"
},
"audio": {
"title": "音频",
@@ -802,10 +793,6 @@
"label": "边框半径",
"reset": "重置边框半径"
},
"compact-lockscreen": {
"description": "仅显示登录输入和系统控制,隐藏天气和媒体小部件。",
"label": "紧凑型锁屏"
},
"dim-desktop": {
"description": "当面板或菜单打开时,桌面变暗。",
"label": "昏暗的桌面"
@@ -824,6 +811,17 @@
"description": "启用或禁用整个界面的工具提示。",
"label": "显示工具提示"
}
},
"lock-screen": {
"compact-lockscreen": {
"description": "仅显示登录输入和系统控制,隐藏天气和媒体小部件。",
"label": "紧凑型锁屏"
},
"lock-on-suspend": {
"description": "系统挂起时自动锁定屏幕。",
"label": "挂起时锁定"
},
"title": "锁屏"
}
},
"widgets": {
+1
View File
@@ -119,6 +119,7 @@ Singleton {
"settings-notifications": "bell",
"settings-osd": "picture-in-picture",
"settings-about": "info-square-rounded",
"settings-lock-screen": "lock",
"bluetooth": "bluetooth",
"bt-device-generic": "bluetooth",
"bt-device-headphones": "headphones",
+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",
+1 -1
View File
@@ -159,7 +159,6 @@ ColumnLayout {
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
@@ -241,6 +240,7 @@ ColumnLayout {
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) {
+6 -19
View File
@@ -230,26 +230,13 @@ ColumnLayout {
Layout.topMargin: Style.marginXL
Layout.bottomMargin: Style.marginXL
}
ColumnLayout {
spacing: Style.marginL
Layout.fillWidth: true
NHeader {
label: I18n.tr("settings.general.lockscreen.section.label")
description: I18n.tr("settings.general.lockscreen.section.description")
NButton {
visible: !DistroService.isNixOS
text: I18n.tr("settings.general.launch-setup-wizard")
onClicked: {
setupWizardLoader.active = false
setupWizardLoader.active = true
}
NToggle {
label: I18n.tr("settings.general.lockscreen.lock-on-suspend.label")
description: I18n.tr("settings.general.lockscreen.lock-on-suspend.description")
checked: Settings.data.general.lockOnSuspend
onToggled: Settings.data.general.lockOnSuspend = checked
}
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginXL
Layout.bottomMargin: Style.marginXL
}
}
+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
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginL
+3 -32
View File
@@ -124,14 +124,14 @@ ColumnLayout {
spacing: 2
NText {
text: I18n.tr("settings.color-scheme.color-source.dark-mode.label")
text: I18n.tr("settings.color-scheme.dark-mode.switch.label")
pointSize: Style.fontSizeL
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
NText {
text: I18n.tr("settings.color-scheme.color-source.dark-mode.description")
text: I18n.tr("settings.color-scheme.dark-mode.switch.description")
pointSize: Style.fontSizeS
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
@@ -167,7 +167,7 @@ ColumnLayout {
color: Color.mSurface
NIcon {
icon: "color-picker"
icon: ProgramCheckerService.matugenAvailable ? "color-picker" : "alert-triangle"
pointSize: Style.fontSizeL
color: Color.mPrimary
anchors.centerIn: parent
@@ -196,7 +196,6 @@ ColumnLayout {
NToggle {
enabled: ProgramCheckerService.matugenAvailable
opacity: ProgramCheckerService.matugenAvailable ? 1.0 : 0.6
checked: Settings.data.colorSchemes.useWallpaperColors && ProgramCheckerService.matugenAvailable
onToggled: checked => {
if (!ProgramCheckerService.matugenAvailable)
@@ -214,34 +213,6 @@ ColumnLayout {
}
}
// Matugen not available notice
RowLayout {
Layout.fillWidth: true
spacing: Style.marginS
visible: !ProgramCheckerService.matugenAvailable
Rectangle {
width: 28
height: 28
radius: Style.radiusM
color: Color.mSurface
NIcon {
icon: "alert-triangle"
pointSize: Style.fontSizeL
color: Color.mPrimary
anchors.centerIn: parent
}
}
NText {
text: I18n.tr("settings.color-scheme.color-source.use-wallpaper-colors.description")
// Reuse description; availability is visually indicated
pointSize: Style.fontSizeS
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
}
// Matugen scheme type (visible when wallpaper colors enabled and matugen available)
ColumnLayout {
Layout.fillWidth: true
+8
View File
@@ -9,6 +9,7 @@ RowLayout {
property string label: ""
property string description: ""
property bool enabled: true
property bool checked: false
property bool hovering: false
property int baseSize: Math.round(Style.baseWidgetSize * 0.8 * Style.uiScaleRatio)
@@ -18,6 +19,7 @@ RowLayout {
signal exited
Layout.fillWidth: true
opacity: enabled ? 1.0 : 0.6
NLabel {
label: root.label
@@ -71,14 +73,20 @@ RowLayout {
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onEntered: {
if (!enabled)
return
hovering = true
root.entered()
}
onExited: {
if (!enabled)
return
hovering = false
root.exited()
}
onClicked: {
if (!enabled)
return
root.toggled(!root.checked)
}
}