From 343b9992e296c2b6ce14a0dabafac31b45620e30 Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Thu, 28 May 2026 18:13:06 -0700 Subject: aero: fix 1:1 drag at non-1.0 zoom, scale window text on resize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drag and resize handlers were reading pointer deltas in visual pixels but writing to style.left/width which live in the (zoomed) layout coord space — so dragging at zoom 0.7 lagged 30% behind the cursor. Now divide deltas by window.__uiScale (set by the desktop-fit script). Also: when a window is resized, scale its title bar and body via `zoom` so the text inside grows/shrinks with the window. Baseline is captured on first resize. --- index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 940919e..3e6f6a6 100755 --- a/index.html +++ b/index.html @@ -293,6 +293,7 @@ var s = Math.min(window.innerWidth / BASE_W, window.innerHeight / BASE_H); s = Math.min(1, Math.max(MIN, s)); document.documentElement.style.zoom = s; + window.__uiScale = s; } fit(); window.addEventListener('resize', fit); @@ -545,7 +546,7 @@