fix: Explorer-Fenster wachsen mit der Bildschirmbreite

- Maximierte Fenster nutzen 100 % des Arbeitsbereichs statt einer beim Rendern
  festgeschriebenen Pixelbreite und folgen so Browser-Resizes.
- Neue Explorer-Fenster nutzen den verfügbaren Platz; 900x540 bleibt Minimum.
- Paket 2026.11.21.r002.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mikei386andClaude Opus 5.5 committed 2026-11-21 12:49:39 +01:00
1 parent 017ed6489a
commit 0bf6eae6d8
4 files changed
+13 -9

No files matched your search

+10 -6
View File
@@ -115,11 +115,14 @@ function openExplorer(initialPath = state.config?.roots?.[0]?.path) {
statusText.textContent = 'Kein Root-Pfad konfiguriert';
return null;
}
const x = 24 + state.windows.length * 24;
const y = 20 + state.windows.length * 20;
// Use the available workspace on large screens; 900x540 stays the minimum default.
const win = createWindow('Explorer', 'explorer', {
width: 900,
height: 540,
x: 24 + state.windows.length * 24,
y: 20 + state.windows.length * 20,
width: Math.max(900, workspace.clientWidth - x - 24),
height: Math.max(540, workspace.clientHeight - y - 20),
x,
y,
data: {
path: initialPath,
entries: [],
@@ -257,8 +260,9 @@ function renderWindow(win) {
el.className = `window ${state.focusedId === win.id ? 'focused' : ''} ${win.maximized ? 'maximized' : ''}`;
el.style.left = `${win.maximized ? 0 : win.x}px`;
el.style.top = `${win.maximized ? 0 : win.y}px`;
el.style.width = `${win.maximized ? workspace.clientWidth : win.width}px`;
el.style.height = `${win.maximized ? workspace.clientHeight : win.height}px`;
// Maximized windows follow the workspace when the browser is resized.
el.style.width = win.maximized ? '100%' : `${win.width}px`;
el.style.height = win.maximized ? '100%' : `${win.height}px`;
el.style.zIndex = win.zIndex;
el.dataset.windowId = win.id;
el.addEventListener('pointerdown', () => focusWindow(win));