mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
SetupWizard: Improved kickstart and fixed odd size on tiny screens.
This commit is contained in:
@@ -11,8 +11,8 @@ import qs.Modules.MainScreen
|
||||
SmartPanel {
|
||||
id: root
|
||||
|
||||
preferredWidth: Math.round(520 * Style.uiScaleRatio)
|
||||
preferredHeight: Math.round(600 * Style.uiScaleRatio)
|
||||
preferredWidth: Math.round(preferredWidthRatio * 2560 * Style.uiScaleRatio)
|
||||
preferredHeight: Math.round(preferredHeightRatio * 1440 * Style.uiScaleRatio)
|
||||
preferredWidthRatio: 0.4
|
||||
preferredHeightRatio: 0.6
|
||||
|
||||
|
||||
@@ -74,6 +74,11 @@ ShellRoot {
|
||||
IdleInhibitorService.init()
|
||||
PowerProfileService.init()
|
||||
DistroService.init()
|
||||
|
||||
// Only open the setup wizard for new users
|
||||
if (!Settings.data.setupCompleted) {
|
||||
checkSetupWizard()
|
||||
}
|
||||
}
|
||||
|
||||
Overview {}
|
||||
@@ -100,17 +105,6 @@ ShellRoot {
|
||||
}
|
||||
}
|
||||
|
||||
// Setup Wizard - Auto Kick start
|
||||
Connections {
|
||||
target: Settings
|
||||
function onSettingsLoaded() {
|
||||
// Only open the setup wizard for new users
|
||||
if (!Settings.data.setupCompleted) {
|
||||
checkSetupWizard()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkSetupWizard() {
|
||||
// Wait for distro service
|
||||
if (!DistroService.isReady) {
|
||||
@@ -125,23 +119,25 @@ ShellRoot {
|
||||
}
|
||||
|
||||
if (Settings.data.settingsVersion >= Settings.settingsVersion) {
|
||||
// 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()
|
||||
})
|
||||
}
|
||||
}
|
||||
showSetupWizard()
|
||||
} else {
|
||||
Settings.data.setupCompleted = true
|
||||
}
|
||||
}
|
||||
|
||||
function showSetupWizard() {
|
||||
// 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(() => {
|
||||
showSetupWizard()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user