feat(ui): widen cards to a 2/3 column grid and add a disabled role

Two columns portrait and three landscape read better than 3/4 on a 320x480
panel. The new disabled palette role sits between face and muted, for a
control that is present but inactive.
This commit is contained in:
2026-08-04 13:10:05 -04:00
parent 4533c7f61f
commit 3416f54c83
3 changed files with 15 additions and 8 deletions
+2 -1
View File
@@ -75,6 +75,7 @@ local function palette(seed)
color = color(foreground),
muted = color(mix(foreground, background, 0.45)),
accent = color(accent),
disabled = color(mix(background, foreground, 0.25)),
face = color(mix(background, foreground, 0.08)),
pressedFace = color(accent),
pressedColor = color(background),
@@ -187,7 +188,7 @@ end
---@return integer side
---@return integer columns
function ui.cardSide(count, pad, gap, reserve)
local columns = gui.getWidth() >= gui.getHeight() and 4 or 3
local columns = gui.getWidth() >= gui.getHeight() and 3 or 2
local rows = math.ceil(count / columns)
local byWidth = (gui.getWidth() - 2 * pad - (columns - 1) * gap) // columns
local byHeight = (gui.getHeight() - 2 * pad - (reserve or 0) - (rows - 1) * gap) // rows