summaryrefslogtreecommitdiff
path: root/docs/macos.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/macos.md')
-rw-r--r--docs/macos.md58
1 files changed, 32 insertions, 26 deletions
diff --git a/docs/macos.md b/docs/macos.md
index 3c02de8a..3fdf399f 100644
--- a/docs/macos.md
+++ b/docs/macos.md
@@ -14,6 +14,10 @@ plumbing actually requires, and which parts of it are distribution machinery
rather than integration. Read that for the alternatives; this file is what was
built and why.
+Future layout/compositing ownership and the regression baseline are discussed in
+[Shared rendering contract](rendering-parity-design.md). That proposal is design
+groundwork; the native drawing implementation remains in place.
+
## Why not ghostty's split
Ghostty was read carefully before this was written, and this backend
@@ -496,33 +500,22 @@ different kinds of assertion because a snapshot is the core's cell buffer and
the core has no font: `font Menlo-Regular` asks the view what it is actually
wearing, and the snapshots catch the grid moving when the cell changes size.
-### The tagline band follows the core's rule, not this shell's
+### Compact tags and context rows
-A pane tag is drawn at `gui_tagline_font_percent` of the body face
-(`TaglineSize <percent>` changes it live) and the band it sits on shrinks with
-it, while the grid row stays body-sized. Where that shorter band sits inside its
-row is no longer this shell's arithmetic: `pardes_tagline_band_offset` and
-`pardes_topbar_pane_border_px` answer out of `src/pardes.zig`, and that is the
-same rule `src/gui/gui.zig` draws with.
+`TaglineSize <percent>` scales the tag face, pitch and glyph band. The tag's
+background still fills a whole body-grid row, as in the SDL renderer. Painting
+only the compact band leaves dark strips between tags. Glyph offsets come from
+`pardes_tagline_band_offset`; all measurements cross the ABI in physical pixels.
-It is shared because it drifted. This shell centred every band in its own row,
-and centring two reduced-height bands is precisely the case
-`config.gui_topbar_pane_border_px` exists to prevent: the topbar's unused
-half-band meets the first pane tag's unused half-band and the window background
-shows through the seam. The strip is as wide as the bands are short — on a
-20-pixel cell, 4 physical pixels at the default 82%, 10 at 50%, 14 at 30% — so it
-read as "the tagline is wrong on the mac" rather than as one missing rule. Row
-zero is bottom-aligned now, the first pane-tag row top-aligned, the two joined by
-`gui_topbar_pane_border_px` in the theme's scrollbar-track colour
-(`pardes_topbar_pane_border_rgb`, or a compiled override), every row between
-centred, and a `Tagbottom` band on the final row bottom-aligned against the
-window edge — with the sub-cell strip below it painted in that band's own colour,
-because the core grid holds only whole cells and a window is any height it likes.
+The chrome overlay runs after the compact layers. It draws the topbar rule,
+the column rule and the pane's tag/body boundary using the theme's border
+colour. The pane rule moves above a bottom-positioned tag. Tag-layer fields 11
+and 12 preserve that placement and colour in frozen transition frames.
-The offsets cross as PHYSICAL PIXELS. The host multiplies its points by the
-backing scale going in and divides coming out, which is the snapping `Metrics`
-already does for the cell, and is what keeps a one-pixel rule one pixel instead
-of a two-pixel smear.
+Tree-sitter context rows use the compact height and pitch, with full-width row
+backgrounds. Their one-physical-pixel separators use the same border colour as
+SDL, after discontinuous declarations and after the final context row. The
+remaining body starts immediately after the compact rows.
### The cell is snapped to device pixels, not to points
@@ -713,6 +706,20 @@ The blur is a **sibling** of the grid inside a plain container, never its
parent. Hiding a superview hides its subviews, so a nested backdrop drew a
blank window for every opaque theme the moment it was hidden.
+`WindowOpacity <0..100>` sets one background coverage throughout the frame.
+Background fills replace existing coverage, so overlapping ground, cell, tag
+and context layers cannot increase the requested opacity. The window itself
+stays clear below 100%; a second tinted window backdrop would compound it.
+Text and cursor ink stay opaque. PDF and image pixels follow the SDL image
+pipeline: remove the destination by source coverage, then add the image at the
+requested opacity. This also preserves the background under transparent image
+pixels. Theme colours and attachment rasters are interpreted as sRGB.
+
+`test/macos-snapshots/rendering-parity.snap` checks background colour and alpha,
+regular and bottom tags, compact context separators, and PDF fit, tint and
+scrolling. Its native-metrics mode uses backing pixels like the shipping app;
+the older grid-only tests keep their display-independent point metrics.
+
## Threading
One core, touched only from the main thread, plus one pty reader task per pane
@@ -955,8 +962,7 @@ select scripts or directories instead. The executable stays in the build cache.
`test/macos_e2e.swift` links the same Swift sources the app does, minus
`main.swift`, into a second binary — test scaffolding does not ship inside the
-product. Scripts are `test/macos-snapshots/*.snap` (seven of them: boot, cwd,
-drop, font, keys, rotate, trackpad) and speak the tty suite's
+product. Scripts are `test/macos-snapshots/*.snap` and speak the tty suite's
vocabulary (`start`, `wait`, `stable`, `text`, `key`, `snap`, `command`,
`mouse`, `click`, `wheel`, `resize`, `draw`) plus what only
exists here: `fingers <n> <col> <row>`, `force <col> <row>`,