diff --git a/tests/e2e.cjs b/tests/e2e.cjs index 8255de3..845b9ec 100644 --- a/tests/e2e.cjs +++ b/tests/e2e.cjs @@ -115,7 +115,7 @@ const BASE = process.env.BASE || "http://localhost:8000"; await p.mouse.up(); await settle(); const [w1, h1] = await size(); assert.ok(w1 < w0 && Math.abs(w1 - (2 * tile.width + 8)) < 3, `two columns wide: ${w1} (tile ${tile.width})`); - assert.equal(h1, 2 * 76 + 16, "snapped to two whole rows of tiles"); + assert.equal(h1, 2 * 72 + 12, "snapped to two whole rows of tiles"); assert.ok(await p.$(".widget-slot.resizing"), "letting go of a handle keeps the handles"); await p.click(".resize-bar >> text=Done"); await settle(); assert.ok(!(await p.$(".resize-handle"))); diff --git a/web/app.py b/web/app.py index f0d92e4..3b90049 100644 --- a/web/app.py +++ b/web/app.py @@ -104,7 +104,7 @@ GRAB: Const[i32] = 42 # arg: the widget slot showing handles, picked up CHECK_UPDATES: Const[i32] = 43 CAP: Const[i32] = 512 -HOME_CAP: Const[i32] = 40 +HOME_CAP: Const[i32] = 200 WCAP: Const[i32] = 256 APP: Const[i32] = 0 @@ -624,7 +624,7 @@ def view_resize_bar() -> None: def widget_rows(h: i32) -> i32: """Rows of app tiles nearest to a widget height in CSS px, at least one.""" - k: i32 = (h + 16 + 46) // 92 + k: i32 = (h + 12 + 42) // 84 if k < 1: k = 1 return k @@ -639,7 +639,7 @@ def view_home_slot(i: i32) -> None: cls_if("lifted", i == lifted) cls_if("resizing", i == resizing) attr_num("data-slot", i) - # Its height spans whole rows of app tiles (76px rows, 16px gaps; style.css). + # Its height spans whole rows of app tiles (72px rows, 12px gaps; style.css). s_set(scratch, "grid-row:span ") s_add_num(scratch, widget_rows(hh[i])) if hw[i] > 0: diff --git a/web/app.wasm b/web/app.wasm index 66ca9dc..e45e33e 100644 Binary files a/web/app.wasm and b/web/app.wasm differ diff --git a/web/style.css b/web/style.css index 336dab4..7a61f84 100644 --- a/web/style.css +++ b/web/style.css @@ -40,7 +40,7 @@ body { margin: 0; min-height: 100vh; color: #fff; -webkit-tap-highlight-color: t all one height, so a widget spans whole rows of app tiles, and apps fill the cells beside a widget rather than leaving holes (dense packing). Keep the row height and row gap in sync with widget_rows in app.py. */ -.slots { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 4.75rem; row-gap: 1rem; +.slots { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 4.5rem; row-gap: .75rem; grid-auto-flow: row dense; } @media (min-width: 480px) { .apps { grid-template-columns: repeat(5, minmax(0, 1fr)); } .slots { grid-template-columns: repeat(6, minmax(0, 1fr)); } }