@@ -560,13 +560,20 @@ const iconPaths = {
560560 const isMaximized = windowElement.hasAttribute('data-maximized');
561561
562562 if (isMaximized) {
563- // Restore window
563+ // Restore window with smooth animation
564+ windowElement.style.transition = 'all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94)';
564565 const originalData = JSON.parse(windowElement.getAttribute('data-original-size'));
566+ windowElement.style.position = 'absolute';
565567 windowElement.style.top = originalData.top;
566568 windowElement.style.left = originalData.left;
569+ windowElement.style.right = 'auto'; // Reset right constraint
570+ windowElement.style.bottom = 'auto'; // Reset bottom constraint
567571 windowElement.style.width = originalData.width;
568572 windowElement.style.height = originalData.height;
573+ windowElement.style.margin = '';
574+ windowElement.style.maxWidth = '';
569575 windowElement.style.resize = 'both';
576+ windowElement.style.borderRadius = ''; // Restore rounded corners
570577 windowElement.removeAttribute('data-maximized');
571578 windowElement.removeAttribute('data-original-size');
572579 } else {
@@ -580,12 +587,19 @@ const iconPaths = {
580587 windowElement.setAttribute('data-original-size', JSON.stringify(originalData));
581588 windowElement.setAttribute('data-maximized', 'true');
582589
583- // Maximize window
590+ // Maximize window with smooth animation
591+ windowElement.style.transition = 'all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94)';
592+ windowElement.style.position = 'fixed';
584593 windowElement.style.top = '28px'; // Below menu bar
585594 windowElement.style.left = '0px';
595+ windowElement.style.right = '0px'; // Ensure it goes to right edge
596+ windowElement.style.bottom = '120px'; // Above dock
586597 windowElement.style.width = '100vw';
587- windowElement.style.height = 'calc(100vh - 28px - 100px)'; // Menu bar + dock space
598+ windowElement.style.height = 'calc(100vh - 28px - 120px)'; // Menu bar + dock space
599+ windowElement.style.margin = '0';
600+ windowElement.style.maxWidth = 'none';
588601 windowElement.style.resize = 'none';
602+ windowElement.style.borderRadius = '0px'; // Remove rounded corners in fullscreen
589603 }
590604
591605 this.focusWindow(windowElement);
0 commit comments