diff --git a/src/gui/src/UI/UITaskbar.js b/src/gui/src/UI/UITaskbar.js index eae7c44a..2122959d 100644 --- a/src/gui/src/UI/UITaskbar.js +++ b/src/gui/src/UI/UITaskbar.js @@ -593,45 +593,6 @@ window.update_desktop_dimensions_for_taskbar = function() { } }; -// Function to update maximized window positioning based on taskbar position -window.update_maximized_window_for_taskbar = function(el_window) { - const position = window.taskbar_position || 'bottom'; - - // Handle fullpage mode differently - if (window.is_fullpage_mode) { - $(el_window).css({ - 'top': window.toolbar_height + 'px', - 'left': '0', - 'width': '100%', - 'height': `calc(100% - ${window.toolbar_height}px)`, - }); - return; - } - - if (position === 'bottom') { - $(el_window).css({ - 'top': window.toolbar_height + 'px', - 'left': '0', - 'width': '100%', - 'height': `calc(100% - ${window.taskbar_height + window.toolbar_height + 6}px)`, - }); - } else if (position === 'left') { - $(el_window).css({ - 'top': window.toolbar_height + 'px', - 'left': window.taskbar_height + 1 + 'px', - 'width': `calc(100% - ${window.taskbar_height + 1}px)`, - 'height': `calc(100% - ${window.toolbar_height}px)`, - }); - } else if (position === 'right') { - $(el_window).css({ - 'top': window.toolbar_height + 'px', - 'left': '0', - 'width': `calc(100% - ${window.taskbar_height + 1}px)`, - 'height': `calc(100% - ${window.toolbar_height}px)`, - }); - } -}; - //------------------------------------------- // Dynamic taskbar item resizing for left/right positions //------------------------------------------- diff --git a/src/gui/src/UI/UIWindow.js b/src/gui/src/UI/UIWindow.js index 1e31fbaa..9e747377 100644 --- a/src/gui/src/UI/UIWindow.js +++ b/src/gui/src/UI/UIWindow.js @@ -240,6 +240,9 @@ async function UIWindow(options) { options.is_visible = false; options.position = 'absolute !important'; options.left = 'auto !important'; + + // panel is not visible by default + options.is_visible = false; } h += `
0){ + width = window.innerWidth - 400 - 2; + } + + $(el_window).css({ + 'top': window.toolbar_height + 'px', + 'left': '0', + 'width': width, + 'height': height + 'px', + }); + } else if (position === 'left') { + $(el_window).css({ + 'top': window.toolbar_height + 'px', + 'left': window.taskbar_height + 1 + 'px', + 'width': `calc(100% - ${window.taskbar_height + 1}px)`, + 'height': `calc(100% - ${window.toolbar_height}px)`, + }); + } else if (position === 'right') { + $(el_window).css({ + 'top': window.toolbar_height + 'px', + 'left': '0', + 'width': `calc(100% - ${window.taskbar_height + 1}px)`, + 'height': `calc(100% - ${window.toolbar_height}px)`, + }); + } +}; + + export default UIWindow;