mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
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:
@@ -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",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user