diff --git a/Modules/Settings/Tabs/GeneralTab.qml b/Modules/Settings/Tabs/GeneralTab.qml index e01bb567d..ca1c5ba0e 100644 --- a/Modules/Settings/Tabs/GeneralTab.qml +++ b/Modules/Settings/Tabs/GeneralTab.qml @@ -235,8 +235,20 @@ ColumnLayout { visible: !DistroService.isNixOS text: I18n.tr("settings.general.launch-setup-wizard") onClicked: { - setupWizardLoader.active = false - setupWizardLoader.active = true + var targetScreen = PanelService.openedPanel ? PanelService.openedPanel.screen : (Quickshell.screens.length > 0 ? Quickshell.screens[0] : null) + if (!targetScreen) { + return + } + var setupPanel = PanelService.getPanel("setupWizardPanel", targetScreen) + if (setupPanel) { + setupPanel.open() + } else { + Qt.callLater(() => { + var sp = PanelService.getPanel("setupWizardPanel", targetScreen) + if (sp) + sp.open() + }) + } } } } diff --git a/Modules/SetupWizard/SetupCustomizeStep.qml b/Modules/SetupWizard/SetupCustomizeStep.qml index 0c9f58535..52da15766 100644 --- a/Modules/SetupWizard/SetupCustomizeStep.qml +++ b/Modules/SetupWizard/SetupCustomizeStep.qml @@ -442,6 +442,108 @@ ColumnLayout { } } + // Divider + Rectangle { + Layout.fillWidth: true + Layout.preferredHeight: 1 + color: Color.mOutline + opacity: 0.2 + Layout.topMargin: Style.marginS + Layout.bottomMargin: Style.marginS + } + + // Dim Desktop toggle + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + Rectangle { + width: 32 + height: 32 + radius: Style.radiusM + color: Color.mSurface + NIcon { + icon: "screen-share" + pointSize: Style.fontSizeL + color: Color.mPrimary + anchors.centerIn: parent + } + } + ColumnLayout { + Layout.fillWidth: true + spacing: 2 + NText { + text: I18n.tr("settings.user-interface.dim-desktop.label") + pointSize: Style.fontSizeL + font.weight: Style.fontWeightBold + color: Color.mOnSurface + } + NText { + text: I18n.tr("settings.user-interface.dim-desktop.description") + pointSize: Style.fontSizeS + color: Color.mOnSurfaceVariant + wrapMode: Text.WordWrap + Layout.fillWidth: true + } + } + NToggle { + checked: Settings.data.general.dimDesktop + onToggled: function (checked) { + Settings.data.general.dimDesktop = checked + } + } + } + + // Divider + Rectangle { + Layout.fillWidth: true + Layout.preferredHeight: 1 + color: Color.mOutline + opacity: 0.2 + Layout.topMargin: Style.marginS + Layout.bottomMargin: Style.marginS + } + + // Drop Shadows toggle + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + Rectangle { + width: 32 + height: 32 + radius: Style.radiusM + color: Color.mSurface + NIcon { + icon: "shadow" + pointSize: Style.fontSizeL + color: Color.mPrimary + anchors.centerIn: parent + } + } + ColumnLayout { + Layout.fillWidth: true + spacing: 2 + NText { + text: I18n.tr("settings.user-interface.shadows.label") + pointSize: Style.fontSizeL + font.weight: Style.fontWeightBold + color: Color.mOnSurface + } + NText { + text: I18n.tr("settings.user-interface.shadows.description") + pointSize: Style.fontSizeS + color: Color.mOnSurfaceVariant + wrapMode: Text.WordWrap + Layout.fillWidth: true + } + } + NToggle { + checked: Settings.data.general.enableShadows + onToggled: function (checked) { + Settings.data.general.enableShadows = checked + } + } + } + Item { Layout.fillWidth: true Layout.preferredHeight: Style.marginL diff --git a/shell.qml b/shell.qml index fa6451f8e..6e7396681 100644 --- a/shell.qml +++ b/shell.qml @@ -137,6 +137,11 @@ ShellRoot { BatteryPanel {} } + Component { + id: setupWizardComponent + SetupWizard {} + } + Component { id: barComp Bar {} @@ -267,6 +272,9 @@ ShellRoot { }, { "id": "batteryPanel", "component": batteryComponent + }, { + "id": "setupWizardPanel", + "component": setupWizardComponent }] // Bar component @@ -291,20 +299,6 @@ ShellRoot { } } - // ------------------------------ - // Setup Wizard - Loader { - id: setupWizardLoader - active: false - asynchronous: true - sourceComponent: SetupWizard {} - onLoaded: { - if (setupWizardLoader.item && setupWizardLoader.item.open) { - setupWizardLoader.item.open() - } - } - } - Connections { target: Settings function onSettingsLoaded() { @@ -329,7 +323,21 @@ ShellRoot { } if (Settings.data.settingsVersion >= Settings.settingsVersion) { - setupWizardLoader.active = true + // Open Setup Wizard as a panel in the same windowing system as Settings/ControlCenter + if (Quickshell.screens.length > 0) { + var targetScreen = Quickshell.screens[0] + var setupPanel = PanelService.getPanel("setupWizardPanel", targetScreen) + if (setupPanel) { + setupPanel.open() + } else { + // If not yet loaded, ensure it loads and try again shortly + Qt.callLater(() => { + var sp = PanelService.getPanel("setupWizardPanel", targetScreen) + if (sp) + sp.open() + }) + } + } } else { Settings.data.setupCompleted = true }