Edit SettingsWindow
This commit is contained in:
parent
0bfef118dc
commit
6ef29ae745
17 changed files with 283 additions and 130 deletions
|
|
@ -27,12 +27,25 @@ PanelWindow {
|
|||
property var settingsWindow: null
|
||||
|
||||
// Function to open the modal and initialize temp values
|
||||
function openSettings() {
|
||||
function openSettings(initialTabIndex) {
|
||||
if (!settingsWindow) {
|
||||
// Create new window
|
||||
settingsWindow = settingsComponent.createObject(null); // No parent to avoid dependency issues
|
||||
if (settingsWindow) {
|
||||
// Set the initial tab if provided
|
||||
if (typeof initialTabIndex === 'number' && initialTabIndex >= 0 && initialTabIndex <= 8) {
|
||||
settingsWindow.activeTabIndex = initialTabIndex;
|
||||
}
|
||||
settingsWindow.visible = true;
|
||||
|
||||
// Show wallpaper selector if opening wallpaper tab (after window is visible)
|
||||
if (typeof initialTabIndex === 'number' && initialTabIndex === 6) {
|
||||
Qt.callLater(function() {
|
||||
if (settingsWindow && settingsWindow.showWallpaperSelector) {
|
||||
settingsWindow.showWallpaperSelector();
|
||||
}
|
||||
}, 100); // Small delay to ensure window is fully loaded
|
||||
}
|
||||
// Handle window closure
|
||||
settingsWindow.visibleChanged.connect(function() {
|
||||
if (settingsWindow && !settingsWindow.visible) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue