Draw a wall panel at the size it was drawn for

A dashboard whose canvas matches the screen came out at 95% of it: the
panel and view routes inset the canvas by a further 16px, on top of the
margin the grid already keeps from its own edges. Two margins, one of
them costing the scale. The padding now applies only to the stacked
phone layout, which has no canvas to shrink.

A slider's tick labels are the third row of a control that has three,
and the first thing a short tile runs out of; `ticks: false` drops them
and keeps the reading and the track. The house's two sliders set it.

The 1024x600 preset is named for what it is rather than for a diagonal
it may not have — the same resolution is sold as a seven-inch panel and
as a ten-inch one.
This commit is contained in:
2026-08-25 17:30:37 +02:00
parent 28a00a55d5
commit b1874aacf5
4 changed files with 24 additions and 7 deletions
+6 -2
View File
@@ -81,9 +81,13 @@ function PanelRoute() {
data-touch={root["data-touch"]}
data-palette={root["data-palette"]}
className={cn(
"relative h-svh w-full bg-background p-4 text-foreground",
"relative h-svh w-full bg-background text-foreground",
root.className,
stacked ? "overflow-y-auto" : "overflow-hidden",
// Padding only when stacked. A canvas is already held off its own
// edges by the grid inset, and a second margin outside it costs the
// scale: a dashboard drawn for this screen would come out at 95% of
// the screen it was drawn for.
stacked ? "overflow-y-auto p-4" : "overflow-hidden",
)}
style={root.style}
>
+4 -2
View File
@@ -63,9 +63,11 @@ function PanelView() {
data-touch={root["data-touch"]}
data-palette={root["data-palette"]}
className={cn(
"h-svh w-full bg-background p-4 text-foreground",
"h-svh w-full bg-background text-foreground",
root.className,
stacked ? "overflow-y-auto" : "overflow-hidden",
// See `panel.$id`: the canvas keeps its own margin, so a second one
// here only shrinks it.
stacked ? "overflow-y-auto p-4" : "overflow-hidden",
)}
style={root.style}
>