Fit more rows on one screen: 64px rows, 8px gaps, tighter top

Home rows shrink to 64px with 8px gaps and 40px icons, and the space above
and below the Windows panel is trimmed, so about two more rows of apps fit
on a phone screen. widget_rows and the resize test follow the new rows.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NYASJ6JNxhYwNNJK7ypK2V
This commit is contained in:
Claude committed 2026-10-22 06:22:49 +00:00
1 parent 0b4bf7bf63
commit 68c8cf6aa3
4 files changed
+11 -11

No files matched your search

+2 -2
View File
@@ -629,7 +629,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 + 12 + 42) // 84
k: i32 = (h + 8 + 36) // 72
if k < 1:
k = 1
return k
@@ -644,7 +644,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 (72px rows, 12px gaps; style.css).
# Its height spans whole rows of app tiles (64px rows, 8px gaps; style.css).
s_set(scratch, "grid-row:span ")
s_add_num(scratch, widget_rows(hh[i]))
if hw[i] > 0:
BIN
View File
Binary file not shown.
+7 -7
View File
@@ -15,17 +15,17 @@ body { margin: 0; min-height: 100vh; color: #fff; -webkit-tap-highlight-color: t
/* ---- home */
.home { min-height: 100vh; box-sizing: border-box;
padding: calc(var(--top) + 2.5rem) 16px calc(var(--bottom) + 2rem); }
padding: calc(var(--top) + 2rem) 16px calc(var(--bottom) + 1.5rem); }
.pull { position: fixed; top: calc(var(--top) + .4rem); left: 50%; transform: translateX(-50%);
width: 3rem; height: 1.25rem; padding: 0; border: 0; background: none; cursor: pointer; }
.pull::before { content: ""; display: block; width: 2.25rem; height: .3rem; margin: auto;
border-radius: 999px; background: rgb(255 255 255 / .45); }
.panel { display: flex; gap: .5rem; margin: 0 auto 2rem; padding: .5rem; max-width: 22rem;
.panel { display: flex; gap: .5rem; margin: 0 auto 1rem; padding: .4rem; max-width: 22rem;
border-radius: 1.25rem; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .16);
backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.panel-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: .6rem;
min-height: 3rem; padding: .5rem 1rem; border: 0; border-radius: .9rem;
min-height: 2.5rem; padding: .4rem 1rem; border: 0; border-radius: .9rem;
background: rgb(255 255 255 / .1); color: #fff; font: inherit; font-weight: 500;
cursor: pointer; text-shadow: 0 1px 4px rgb(0 0 0 / .35); }
.panel-btn:hover, .panel-btn:active { background: rgb(255 255 255 / .22); }
@@ -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.5rem; row-gap: .75rem;
.slots { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 4rem; row-gap: .5rem;
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)); } }
@@ -52,9 +52,9 @@ body { margin: 0; min-height: 100vh; color: #fff; -webkit-tap-highlight-color: t
.icon.missing { border-radius: 999px; background: rgb(255 255 255 / .18); object-position: -999px 0; }
.name { max-width: 100%; font-size: .75rem; line-height: 1.2; text-align: center;
text-shadow: var(--shadow-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slots .tile { gap: .3rem; padding: .25rem .1rem; }
.slots .icon { width: 2.75rem; height: 2.75rem; }
.slots .name { font-size: .7rem; }
.slots .tile { gap: .25rem; padding: .2rem .1rem; }
.slots .icon { width: 2.5rem; height: 2.5rem; }
.slots .name { font-size: .68rem; }
/* A widget takes whole rows. On a phone the native widget view covers the slot;
the label only shows while the slot is not live (or in a desktop browser). */