From 8d41692f036f04be0aa5e376c2a0a6376ff66583 Mon Sep 17 00:00:00 2001 From: Andrew Zambazos Date: Thu, 22 Jan 2026 13:11:41 +1300 Subject: [PATCH] Improve zoom handling and setup UI layout Enhanced zoom target selection to better support parent windows in desktop mode and improved menu popup zoom refresh. Updated setup.css to refine layout, scrolling, and visual effects, including better handling for small screen heights and improved sticky footer appearance. --- main.js | 8 +++++++- renderer/menu-popup.js | 3 +++ renderer/setup.css | 29 +++++++++++++++++++++++++---- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 4124ba9..1c0536a 100644 --- a/main.js +++ b/main.js @@ -524,6 +524,13 @@ function destroyBrowserView(win, tabId) { function getZoomTargetForEvent(event) { const win = BrowserWindow.fromWebContents(event.sender); if (!win) return null; + const parentWin = typeof win.getParentWindow === 'function' ? win.getParentWindow() : null; + if (parentWin && !parentWin.isDestroyed?.()) { + if (parentWin.__nebulaMode === 'desktop') { + return getActiveDesktopViewWebContents(parentWin) || parentWin.webContents; + } + return parentWin.webContents; + } if (win.__nebulaMode === 'desktop') { return getActiveDesktopViewWebContents(win) || win.webContents; } @@ -2153,7 +2160,6 @@ ipcMain.on('menu-popup-command', (event, payload = {}) => { try { const menuWin = BrowserWindow.fromWebContents(event.sender); const parentWin = menuWin?.getParentWindow(); - if (menuWin && !menuWin.isDestroyed()) menuWin.hide(); if (!parentWin || parentWin.isDestroyed()) return; if (!payload?.cmd || payload.cmd === 'close') return; parentWin.webContents.send('menu-command', payload); diff --git a/renderer/menu-popup.js b/renderer/menu-popup.js index 901598f..9d24789 100644 --- a/renderer/menu-popup.js +++ b/renderer/menu-popup.js @@ -35,6 +35,9 @@ window.addEventListener('click', (e) => { if (!btn) return; const cmd = btn.getAttribute('data-cmd'); window.electronAPI?.send?.('menu-popup-command', { cmd }); + if (cmd === 'zoom-in' || cmd === 'zoom-out') { + setTimeout(refreshZoom, 50); + } }); window.addEventListener('keydown', (e) => { diff --git a/renderer/setup.css b/renderer/setup.css index f7764ee..1cc8323 100644 --- a/renderer/setup.css +++ b/renderer/setup.css @@ -50,9 +50,10 @@ body, html { flex-direction: column; align-items: center; justify-content: space-between; + height: 100vh; min-height: 100vh; padding: 2rem; - overflow-y: auto; + overflow: hidden; } /* Progress Bar */ @@ -130,7 +131,7 @@ body, html { display: none; flex-direction: column; align-items: center; - justify-content: center; + justify-content: flex-start; width: 100%; max-width: 900px; flex: 1; @@ -159,6 +160,8 @@ body, html { margin-bottom: 2rem; flex: 1; min-height: 0; + overflow-y: auto; + padding-right: 0.5rem; } .setup-title { @@ -528,8 +531,8 @@ body, html { padding-bottom: 1rem; position: sticky; bottom: 0; - background: transparent; - backdrop-filter: none; + background: linear-gradient(180deg, rgba(18, 20, 24, 0), rgba(18, 20, 24, 0.85) 45%, rgba(18, 20, 24, 0.95)); + backdrop-filter: blur(6px); } .btn { @@ -642,3 +645,21 @@ body, html { width: 100%; } } + +@media (max-height: 700px) { + .progress-bar { + margin-bottom: 1.25rem; + } + + .step-content { + margin-bottom: 1rem; + } + + .setup-subtitle { + margin-bottom: 1.25rem; + } + + .feature-grid { + margin: 1rem 0; + } +}