46 Commits
Author SHA1 Message Date
Roman ChojnackiandClaude Opus 5.5 a32bc97624 Render: compute cover areas in 64 bits
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:04:06 +01:00
Roman ChojnackiandClaude Opus 5.5 56a3463c98 Render: software fills skip what later opaque fills cover
A frame drawn whole on the software renderer filled the page background,
then the panel, title bar and sidebar over almost all of it: about twice
the window's pixels per frame. Each large opaque rectangle now fills only
what no later opaque rectangle covers, since that one replaces those
pixels. Clips round inward, so a cover is never larger than what SDL
paints. Damaged frames and frames with fewer than two large opaque fills
are drawn as before.

Pixels and --a11y-dump are unchanged on every showcase page, both themes,
at scales 1, 1.1, 1.25, 1.5, 1.75 and 2, and on notepad and simple.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:22:16 +01:00
Roman ChojnackiandClaude Opus 5.5 72f12cd098 Render: free the last-frame texture after an idle second
An idle window keeps no copy of its last frame; the next change draws
one full frame and partial frames follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 00:38:01 +01:00
Roman ChojnackiandClaude Opus 5.5 66e2d9a0ae Render: mask only frames that draw, one switch per command, SDL rects
The damage keys and the skip hash read the list before rounded fills
become masks; reaktor_damage_render masks once, after a frame proves to
draw and before any pass, the check pass included. command_read keys and
spans a command in one switch. Damage boxes are SDL_Rect, cut, joined and
tested through SDL's helpers; touches keeps its inclusive edge, and
nk_sdl_meets stays, as SDL_HasRectIntersectionFloat counts a shared edge.

The steppers of a property wash only where its field lights: one flag,
reaktor_property_live, for both. The manual says a new theme, icon or atlas
is redrawn where it changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 18:16:36 +01:00
Roman ChojnackiandClaude Opus 5.5 348e611aa0 Icons: keep the stroke color as a color
The image cache keys an icon's stroke as a struct nk_color and writes it
out with reaktor_hex(). The stroke width keeps its printed quantization:
rounding sw * 100 hands the rasterizer a different float at ties such as
0.125 or 1.625.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 17:00:53 +01:00
Roman ChojnackiandClaude Opus 5.5 bbdfeaeacb Damage: key textures by a serial number, not only their address
Each texture the image cache, the corner masks and the font atlas create
gets a serial number in its properties, and image and text keys carry it
next to the pointer, so a texture made again at a freed address reads as
changed. The window's clear color joins the frame hash. Evicting or
clearing the image cache, rebuilding the font and restyling no longer set
must_draw; window events still do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 16:56:45 +01:00
Roman ChojnackiandClaude Opus 5.5 49e1581d07 Damage: bookkeeping only where it is used
Where the damage path cannot apply (no software renderer, or a fractional
scale) the frame is hashed in one streaming pass, without keys or boxes.
Where it does, the frame hash folds the item hashes instead of hashing the
key buffer again.

The diff hands back the area it covers; the per-frame kind, rectangles and
share are locals of reaktor_damage_render; have_ref is !fresh; collected is
cleared once; reaktor_damage_add and collect close an item the same way;
scaled images are found by their recorded indices. The list grows with
reaktor_grow. Each run's vertex box is computed once and tested against
every rectangle, instead of once per rectangle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 16:54:06 +01:00
Roman ChojnackiandClaude Opus 5.5 20c940e87f Render: one pass through one list
Rounded fills become masks once, right after the frame is built, so the
damage keys, text preparation and every pass see the same list.
reaktor_render(app, rects, n) is the one entry: n == 0 draws the whole
window, otherwise one SDL_RenderFillRects clears the rectangles before the
pass. nk_sdl_render_ex goes, and nk_sdl_frame_done keeps only nk_clear and
the frame time.

A frame whose commands changed but whose pixels would not is handled as a
skipped one: no render, no copy, no present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 16:50:12 +01:00
Roman ChojnackiandClaude Opus 5.5 b614363b6d Software: redraw only where the commands changed
With .skip_same_frames, a software frame at a whole-number scale now
redraws only the rectangles whose Nuklear commands changed. Each command
gets a key and a device-pixel box; the list is diffed against the last
drawn one and the changed boxes merged into at most four rectangles. The
frame is drawn into a target texture that keeps the last frame, as SDL
documents a window's back buffer does not, and copied to the window.
Anything that invalidates the window, a capture, a fractional scale or a
GPU renderer draws in full as before.

The test harness redraws every partial frame whole and compares pixels;
damagetest drives hovers, typing, popups, scrolling, toasts, focus,
tweens, a theme switch and scales 1, 2 and 1.25, with and without text
shaping. Shots and dumps match master on every tab in both themes.

Ryzen 5 4600H, showcase at 1100x680, 12 interleaved pairs: render -58% to
-61% per drawn frame, whole frames -42% to -46%, process CPU -9% (hover)
to -26% (slider drag).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 13:41:33 +01:00
Roman ChojnackiandClaude Opus 5.5 c07d6100c2 Build: look icons up by name and ASCII glyphs by index
An icon drawn in a built frame no longer formats an
"external/ionicons/...svg?stroke=...&sw=..." string to find its texture:
the image cache keys Ionicons on name, stroke color, width and size, and
builds the path only on a miss. Codepoints below 128 find their glyph
through a table filled at bake time instead of a binary search.

Pixels and accessibility dumps are unchanged on every showcase tab in both
themes. Software renderer, every frame built, 16 interleaved pairs on a
Ryzen 5 4600H: build time -16% to -22% for icons and -10% to -17% for
glyphs on Login and Buttons; whole frames on Buttons -4.5% and -2.3%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:40:31 +01:00
Roman ChojnackiandClaude Opus 5.5 b772d346df Comments: keep only what the code cannot say
A full audit of Reaktor's own sources: section banners, return-value and
parameter notes, and descriptions of what a function does are gone. What
stays records a library, OS or browser quirk, a threading or lifetime rule,
or a license. Two comments that still named libdbus are corrected. Code is
unchanged; the vendored nk_sdl3_renderer.h keeps its own comments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:24:23 +01:00
Roman ChojnackiandClaude Opus 5.5 6066f21306 Timing that names the rasterizing, and skipped frames that stay clean and paced
SDL only queues draw calls, so a software frame's rasterizing was booked
as present. The runtime now flushes before the present timer, and the
docs and Diagnostics say what each number holds.

A skipped frame never reached nk_clear, so the next build's popups and
overlay never joined the list and combos stopped answering; it clears
now. Skipped frames also had no present to wait on, so a tween that
changed no pixel spun a core at about 390,000 frames a second. They now
follow the display's refresh, as a held mouse button does.

A software frame that opens by filling the whole window drops the clear
under it. A theme change forces the next frame to draw.

tests/skiptest.c covers both skip faults and runs in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 03:21:55 +01:00
Roman ChojnackiandClaude Opus 5.5 271b1c143b Gradients: solid bands, one per level, along the run
SDL's software renderer shades a rectangle from its corners far slower than it
fills a solid one. A run is now solid bands, one for each level the ramp moves
by, on whole pixels so neighbors cannot round apart, and the long run lies
across the ramp so each band is drawn once. On the Buttons tab with every
button a gradient pill (23 pills, Windows, software renderer), a frame costs
1.06 ms more than flat pills where it cost 1.66 ms more; present is within
0.1 ms of flat. Flat fills are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 17:48:09 +01:00
Roman ChojnackiandClaude Opus 5.5 4a852cd5d0 Gradients: one shape for flat and graded fills, one emit for the pair
reaktor_fill_round and reaktor_fill_gradient lay out their corners and runs
through one routine; the button's per-state ramps need no separate flag; the
two background properties emit the gradient through one call. Pixels and
--a11y-dump unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 17:37:39 +01:00
Roman ChojnackiandClaude Opus 5.5 1ea440438f CSS: linear-gradient() fills buttons and a slider's filled part
background and background-image take a two-stop linear-gradient() run to a
side or a multiple of 90deg; background-color leaves it in place, as in CSS.
reaktor_style carries it as gradient, gradient_from and gradient_to, and bg
falls back to the first stop where nothing draws it. A rounded gradient is the
corner masks cut into texel strips along the run, each tinted where it sits,
and multi-color runs between them, so its edge is as smooth as a solid fill's
on the software renderer. reaktor_fill_gradient draws one for an application.
Requested by PapayaPlayer (#104, item 1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 16:10:22 +01:00
Roman ChojnackiandClaude Opus 5.5 7a8ae2ef3b Work done once: print warm-up, preferences, list cells, glyph state
- Printing: the warm-up frames before a page is captured build without
  rendering or presenting; only the capture frame draws. The PDF is
  byte-identical, and a two-page export takes 359 to 344 ms of CPU.
- System preferences are read once on every path; load_theme no longer
  reads them again after its caller has.
- A list row asks for its first cell once, for the accessible name and
  the drawing, and a tree row no longer asks for its label a third time.
- The software renderer asks a texture's size once per draw command,
  sets a glyph's color only when it changes, and puts the color and
  blend back once per run instead of after every rectangle. Render step:
  0.24 to 0.19 ms on Login, 0.97 to 0.85 ms on Buttons.

Pixels and --a11y-dump are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 17:14:20 +02:00
Roman ChojnackiandClaude Opus 5.5 66129d3bc7 Atlas: each font opened once, kept for later windows; DPI, Retina and portal fixes
- The atlas bake opens each font file once instead of once per size:
  36.8 ms to 18.5 ms per bake, byte-identical output. A threaded bake
  was faster still but kept 0.5-1.1 MB the heap never returned.
- The first window after the main one keeps its atlas image and glyph
  tables; later windows and menus copy them instead of baking (about
  11 ms to 0.3 ms each). Freed when the main window rebakes or quits.
- The first window is sized by the primary display's content scale;
  reaktor_dpi_query_scale(NULL) always answered 1.0.
- Windows opened with reaktor_window_open are sized in window
  coordinates, as popups already were, so a Retina Mac no longer
  doubles them.
- Linux reads the portal's settings in one ReadAll call and stops asking
  only when there is no portal or no ReadAll; reaktor_prefers() replaces
  the two preference queries.
- The a11y tree finds a node through its hash index; sRGB to linear is a
  table; a box reads its style once; the locale scan is one pass.
- PERFORMANCE.md, the chart and the README remeasured for Reaktor.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 16:33:23 +02:00
Roman ChojnackiandClaude Opus 5.5 f1404b4193 CSS reads declarations on first match; startup timings; D3D switch and /Gw
The engine parses every selector when the sheets load and a rule's
declarations the first time a query matches it. Loading the sheets takes
0.16 ms instead of 0.35, and the first round of queries on top 0.21 ms
instead of 0.33. A sheet can be added after the others: the role sheet is
appended with reaktor_style_add instead of loading every sheet again.

Diagnostics and the Inspector show where startup goes: the window, the
font atlas and the first frame, beside the stylesheets.

REAKTOR_SDL_D3D, on by default, builds SDL's Direct3D 11 and 12 renderers;
off, a program is 105 KB smaller and draws in software only. MSVC builds
with /Gw, so unused data goes as unused functions do: 24 KB off the small
programs, 96 KB off the showcase. DOCUMENTATION steers away from direct3d11,
whose CPU is in SDL's renderer or the driver, and the chart drops it.

Against the libcss build, measured in one session with the clock pinned,
old and new alternating: private memory is 0.16-0.28 MB lower everywhere,
direct3d11 frames a little faster, and the rest the same within noise.
PERFORMANCE.md carries today's sizes, memory, frame times and WARP, with
the frame-time method written down.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 11:59:03 +02:00
Roman ChojnackiandClaude Opus 5.5 dffcce22d5 CSS: Reaktor's own engine replaces libcss, and a pass of simplifications
core/css/css.c reads the stylesheets once into typed values and cascades
them as CSS does: !important, then specificity, then source order. It takes
var(), color-mix(in srgb, ...), em and rem, calc() over pixels, the @media
features Reaktor answers, @import at the top of a sheet, :not(), :enabled,
attribute selectors read as classes, descendant and child combinators, and
escapes. Rules are bucketed by the last compound of their selector, so a
query checks only the rules that could match. cssflat.c, LCUI's libcss and
yutil, and the lcui submodule go.

Screenshots of every showcase tab, notepad and simple, light and dark, with
normal and more contrast, are byte-identical to the libcss build, with
Water.css and with Simple.css; --a11y-dump differs only in the a11y struct's
size. Three values change to what CSS says: an unset background is
transparent black, an unset border color is the text's, and Simple.css's
:enabled:hover no longer reaches a disabled button. Against libcss, loading
the sheets takes 0.35 ms instead of 1.24 and a first query 0.32 us instead
of 4.4. csstest covers the cascade, values, @media and hostile sheets: import
loops and fan-out, var() that grows or expands too often, deep calc(), a sheet
left open, a huge file. 200,000 mutated sheets ran clean under AddressSanitizer.

Simplifications: dead state (redraw_always, sw_noaa, the hover-gap pin, a
muted note, an overwritten slider range, the font-baking blocks of the SDL
renderer, the a11y change index); REAKTOR_LAY_FILL for FILL_X | FILL_Y; one
helper each for flag parsing, capture runs, timings, paths from the working
directory, array growth, focus moves, tooltips, button presses, a11y slot
probes, UIA fragments and test strings; launchtest's notef() and last_node();
the output folder set once in CMake and a write-if-changed function; one test
list, tools/ci/tests.txt, for every workflow, so basetest and imagetest run.

The showcase drops its relaunch button, an ask() button is as wide as its
label, and build.sh takes a bare target. The docs follow, and PERFORMANCE.md
and the chart carry a new pass of all seven benchmark arms on one machine.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 02:37:13 +02:00
Roman ChojnackiandClaude Opus 5.5 37988199de Fonts: FreeType reads and draws them; Nuklear's baking and stb_truetype go
core/render/font.c builds the atlas: FreeType 2.15.0 draws each glyph with
light hinting, and the metrics are Nuklear's, so layout is unchanged. The
Text module draws its fallback glyphs with FreeType too, and a font is
checked by opening it with FreeType. NK_INCLUDE_FONT_BAKING and
NK_INCLUDE_DEFAULT_FONT are off, which takes stb_truetype and stb_rect_pack
out of the build.

FreeType builds only its TrueType, CFF, autofit and smooth modules, and
reaktor_ftoption.h drops what Reaktor never reads, its environment override
among them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 08:29:04 +02:00
Roman ChojnackiandClaude Opus 5.5 2d982889fc Simplify the unmerged changes and fix two of them
The tree's jump to a parent checks the parent against the tree's count, not
the list's. A font's name table is checked in reaktor_font_valid, before
Nuklear reads it, in place of the late check in text.c.

cssflat.c checks every token with one token_ok, frees in one place in
emit_one, and drops unresolved variables once. UTF-8 cleaning uses SDL's
decoder. The file dialog flag becomes file_busy, freed by reaktor_app_free.
urltest becomes basetest and holds the UTF-8 checks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 23:47:08 +02:00
Roman ChojnackiandClaude Opus 5.5 896be154f7 Out-of-memory edges in text fields and rounded fills
A field whose buffer could not grow reported the larger capacity it asked for, and a rounded fill whose scissor could not be pushed linked a command at the buffer's end. Both now leave things as they were.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 22:34:42 +02:00
Roman ChojnackiandClaude Opus 5.5 a6c09d8469 Fewer comments in the splash and the software geometry path
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 19:46:23 +02:00
Roman ChojnackiandClaude Opus 5.5 13632a4ccc Opaque geometry drawn unblended on the software renderer; benchmark re-run
- SDL's software renderer blends a triangle through a surface of its own,
  so untextured triangles that are all opaque now go to it with blending
  off, as opaque rectangles already did. Pixels and a11y dumps are
  byte-identical on every showcase page in both themes.
- Reaktor's three benchmark rows re-measured from a fresh Release build
  with the submodules at their pinned commits: software 9.5 MB and 8.9% of
  a core (was 10.0 MB, 16.4%), direct3d11 60.0 MB, 13.9%, opengl 90.1 MB,
  12.8%. Table, chart, README alt text and the bench-versus-sampler note
  follow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 14:08:46 +02:00
adminandClaude Opus 5.5 d0e3ae843c Buttons sized and drawn like GTK's: content width, centered icon, custom content
- .fit_content sizes an icon button to the icon's drawn width, a 12 px gap,
  the label and half the sheet's padding; a .box.w is then its least width,
  and the button rule's min-width applies.
- At any width the icon and label are centered together on the icon's drawn
  pixels; the icon follows the button font, or 'button .icon' in the sheet.
- reaktor_button_width, reaktor_button_accent_icon, .accent with .icon.
- reaktor_button_custom and .paint/.paint_user: the sheet's button with the
  inside painted by the app.
- Showcase: icon buttons sized to content and wrapping, a Width section with
  the four ways to size a button, and a Custom content section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 15:41:20 +02:00
adminandClaude Opus 5.5 e625e496ad Shared test helpers, no MSVC warnings, Nuklear tree arrows; faster BSD and emulated Linux CI
Code: the tests' seven pass/fail helpers are one tests/test.h; the
showcase's doubled ROW_SMALL is the login card's ROW_NOTE, and vertex
alignment comes from a named struct rather than NK_ALIGNOF, which MSVC
warned about; Nuklear trees draw their expand arrows again.

CI: every BSD job keeps the packages it downloads between runs, and NetBSD
fetches them from its HTTPS CDN instead of ftp.NetBSD.org. Linux armhf and
riscv64 are cross-compiled in a native x86-64 Debian beside the emulated
one, which only runs what was built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 20:56:39 +02:00
adminandClaude Opus 5.5 d695dc3e24 Drop unused renderer code, share small helpers, and trim CI waits
The renderer header loses its debug font, userdata accessors and the
nk_sdl_render wrapper, none of which anything called. Text width, the
#rrggbb formatter, the clear-style push and pop and the end of a drag are
one helper each; ten functions only one file used are static there.

CI: the Windows ccache download draws no progress bar, the macOS embedded
check compiles through ccache, and the emulated Linux jobs run on master
and releases rather than on every pull request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:25:45 +02:00
adminandClaude Opus 5.5 f756c889e9 Less work per frame, accessibility without needless churn, and cached CI compiles
Rendering skips work it repeated: an image is found by a hash before its
path is compared, an SVG that needs no recoloring is read without staging
copies, wrapped text is measured a word at a time, the software renderer
is told once, and an unchanged clip is not set again.

The accessibility tree interns into two pools that take turns, so a full
pool no longer reports every node as new; on Windows the copy a screen
reader reads is not made until one asks. The text-shaping cache keeps what
is on screen when it fills, and its shaper settings drop only the oldest.

color-mix() reads its colors through plutovg, which adds names and hsl().
SDL's dummy video driver is left out on Windows. Six copies of one hash
are one helper, and the icon calls share one path builder.

Linux, macOS, Windows and the web build keep a ccache between runs, with
SDL's precompiled header off so its compiles are cached too; the web job
also keeps its Emscripten SDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:27:02 +02:00
adminandClaude Opus 5.5 c7a7d77f83 Build trims, two cheaper runtime paths, and housekeeping from the audit
Build: Nuklear and its backend compile once, in reaktor_core, instead of
three times; libHaru's CJK encoders and fonts, never linked, are not
compiled; SDL's OpenGL drivers stay out of Windows builds unless
REAKTOR_SDL_GL is on (the benchmark's OpenGL arm passes it); GCC and
Clang builds collect unused sections. Windows executables lose 109 KB.

Runtime: a theme load skips its second CSS pass when the sheets' own
role tokens already say what the role sheet would. Printing renders a
page in four frames rather than seven when it settles.

Housekeeping: the backend keeps its vertex buffers across frames; a
label measures its text only when that sets its width; cssflat walks
rules through one splitter and drops a dead context; the Inspector
redraws only when the tree, a value or the sheets change; bench reads
process memory every 30 frames; apply_widget_style resolves the button
rule once; file_exists asks SDL_GetPathInfo; the layout reads direction
and declared size back from onlay instead of keeping copies.

Shots and dumps of every showcase tab, simple and notepad, 24 runs with
app sheets, and the printed PDF are byte-identical to master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 14:04:36 +02:00
adminandClaude Fable 5.1 36b46c77d7 Fill anti-aliasing on GPU renderers again, with .anti_aliasing to say otherwise
Fill anti-aliasing went off on every renderer when rounded fills became
masks, which left the bench's rotated boxes jagged under --renderer
direct3d11. A GPU renderer anti-aliases fills again; the software one,
the default, still does not. .anti_aliasing (REAKTOR_AA_AUTO, _ON, _OFF)
and --aa <auto|on|off> decide, and the Diagnostics page reads it back.
The showcase's pixels do not change on either renderer; the bench
screenshot is retaken.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 13:00:34 +02:00
adminandClaude Opus 5.5 38cba09d94 Cleanups: token limit as a parameter, shared icon-button code
reaktor_css_flatten takes the token limit instead of a global setter. A
surface is recorded only once it is drawn. Flat and image buttons share
their press and icon code, and flat ones keep the mapped hover. The
unused inset of push_edit_style is gone, the Inspector draws its icons
through one helper, and the showcase names its strip rounding once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 20:37:44 +02:00
adminandClaude Opus 5.5 bdb12797d2 Water.css and Bamboo for the look; stylesheet and Inspector fixes
Water.css replaces tiny.css and Bamboo replaces simple.css. cssflat reads
@import, and drops a token too long for libcss or a value with a ';',
which crashed Picnic. reaktor.css maps the tokens Water lacks and no
longer overrides its hover.

A label's color token falls back when it vanishes on the page, an icon
moves to the edge before it is dropped, and a field filled like its card
takes the page's color. Buttons get .flat, for icon-only toolbar buttons.

The Inspector opens from Diagnostics, keeps its actions as flat icons
beside the tabs, and has room around its contents. Notepad's menu bar and
the Translations language row are centered and sized. Screenshots are
retaken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 20:31:52 +02:00
adminandClaude Opus 5.5 ea801d0d7b Halve a large raster image before it becomes a texture
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 20:07:47 +02:00
adminandClaude Opus 5.5 e538cf74e8 Reaktor names, faster frames, services, list and splitter, a clearer tree
Names: applications see only reaktor_ names. include/reaktor/nuklear.h
aliases the Nuklear types, constants and calls the samples use, so values
mix freely with nk_*. The samples and public headers use them throughout;
colour and CENTRE are color and CENTER.

Speed: the web accessibility tree moves only the nodes out of place, the
style cache is a hash table with no size cap, wrapped labels keep their
line breaks, and screen-reader lookups in the snapshot are indexed.

Features: reaktor_file_dialog_open (open, many, save, folder, filters),
reaktor_ask, reaktor_timer and reaktor_post, settings with remembered
window geometry, reaktor_list (sheet-styled, only the visible rows, keys
move the selection), reaktor_splitter (drag or arrow keys), .tooltip,
PNG and JPEG through .src, a link's .url, and REAKTOR_CURSOR_*. The quit
confirmation is a reaktor_ask. A root box that fills is as wide as its
panel. Dead code is gone: css_field, unused App fields, duplicate helpers.

Tree: src/ is gone (core/internal.h), core/base/util.h, render/svg.c, the
tests in tests/, assets/css/reaktor.css. app.c hands input to input.c;
declare.c keeps the frame and boxes, controls.c and views.c the widgets.
NukAnim's switch is now nka_set_keep_at_rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 09:10:21 +02:00
adminandClaude Opus 5.5 58adf9cde3 Fewer comments: only those that keep a known bug away
Comments that restated a name, explained a design the docs already
describe, or repeated another comment are gone; what remains names a
dependency's quirk, an ordering rule, or a locale or browser trap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 00:07:26 +02:00
adminandClaude Opus 5.5 0e09031254 Widgets follow the stylesheet more closely, with less code of our own
Compared against Edge rendering tiny.css and simple.css in light and dark:
fields keep their own border and 4 px corners instead of borrowing the
button's, a field's style picks its colors as well as its size, checkboxes
and radios read the sheet's input rules (a transparent border is no longer
drawn as a white ring), and text with no size of its own takes the body's,
as CSS inherits it. The showcase's login card is drawn as the sheet draws a
details box. When a sheet is laid over tiny.css, tiny's --links,
--background-body and --text-main are given its link, page and text colors
in one more sheet read last, so Reaktor's own chrome follows it.

Rounded corners and border runs are drawn by plutovg as a small rounded
rectangle with a straight middle row and column, replacing our own
supersampling and the patch over its middle texels. The renderer rounds a
sub-image's edges to whole texels, which SDL's software copy truncated a
texel short.

Code that dependencies already provide is theirs now: the executable's
folder (SDL_GetBasePath), loading a file (SDL_LoadFile, freed with SDL_free
throughout), stepping UTF-8 (SDL_StepUTF8), the day of the week
(SDL_GetDayOfWeek), rectangle overlap (NK_INTERSECT) and col_of
(nk_rgba_bv). reaktor_core and localetest link SDL.

The cleanups: accent_hex and REAKTOR_BRAND are gone, the accent button reads
app->accent, calc() numbers are read without the locale, sheet margins are
one loop, part_neighbors uses add_margin and take_margin, and comments that
only restated a name became better names.

mkicon no longer converts the 256 px PNG to straight alpha twice, which
had wrapped its edge pixels into stray colors; the icon is regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 23:22:31 +02:00
adminandClaude Opus 5.5 e02539ea7b Margins, accent, hover and disabled come from the sheet
A rule's margin now only parts a widget from its neighbors. Across a row or
column it is skipped, since the page sized the box; along it the first
widget's leading margin and the last one's trailing margin are dropped, so a
row of buttons starts and ends where the field below it does, and in a row
that wraps each line starts at the edge. A margin set in code always counts.
The first frame after a stylesheet loads counts as unsettled, so the new
sheet's sizes are laid out before the frame settles.

cssflat.c works out calc() over pixels and plain numbers, drops :enabled,
since every widget that asks is enabled, rewrites a bare [disabled] as
.disabled, and drops a selector that names the same class or pseudo-class
twice in one compound, which made libcss go on using a list it had freed. The
new csstest checks those, and simple.css read through it, in every CI job.

The page and its text come from the body rule, and the accent from a:link,
falling back to --links: accent buttons, sliders, progress bars, checks and
accent icons follow it, and reaktor_page_color and reaktor_accent_color hand
them to an application. Fields read input.type-text, so a sheet's
[type=text] rule reaches them. reaktor_style carries a rule's opacity.

A disabled button reads button.disabled:disabled and is faded by that rule's
opacity, as a browser fades it, instead of having its colors halved toward
black; a sheet that does not tell a disabled button apart gets half. A rule
can give a button's border a color per state, and an icon on a button takes
its label's color. A rounded border's straight runs are cut from mask texels
that hold a straight band, so a one-pixel border with small corners is sharp.

The showcase's login card takes its height from its rows, so a sheet's
margins no longer push the last line out of it, and the showcase's accented
decorations read reaktor_accent_color.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 12:02:06 +02:00
adminandClaude Opus 5.5 e6c0b85601 libreaktor, and a public API to build against
Applications now include reaktor/reaktor.h and nothing else of
Reaktor's: include/reaktor holds every type and call a program uses,
App is opaque, and the internal headers include the public ones instead
of declaring the same things again. The samples prove it: each builds
from the public headers alone, MSVC refuses an implicit declaration in
any app, and the showcase draws every page as before. Where they reached
into App there are calls now: the SDL window and renderer, the theme,
the borderless titlebar, focus areas, SVG icons, and the frame and
process timings.

The libreaktor target merges Reaktor, its modules and every dependency
into one static archive, and the libreaktor install component lays it
out with the public headers, Nuklear's and SDL's, a CMake package
(find_package(reaktor), reaktor::reaktor), a pkg-config file and the
licenses. Added with add_subdirectory, Reaktor builds no samples or
tests and installs nothing unless asked. examples/consumer builds Simple
against an installed package.

Every workflow builds, installs and links libreaktor and checks that the
consumer's Simple draws exactly what the tree's does. Releases gain a
libreaktor archive for every system and architecture, and SHA256SUMS.
The version is 0.2.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 14:46:41 +02:00
adminandClaude Opus 5.5 5700a61e60 Windows of their own, the BSD jobs, and a question before closing
A window opened with reaktor_window_open now runs as its own App: an input
queue that takes one change a frame, a wake of its own, its keys and dropped
files through the key hook and file_opened with its App, animations scoped
to it, and its accessibility tree served to UI Automation under its own
handle (NSAccessibility and AT-SPI still serve the main window only).
Closing one frees its layout, undo, icon cache and queue, and one closed
while its file picker is open is kept until the picker answers.
reaktor_set_title retitles the window whose App it gets, and a theme set
from any window applies to every window.

Nuklear's own rounded fills are swapped for masks once the command list is
built, so fill anti-aliasing stays off on every renderer without jagged
corners on the GPU ones. GTK's setlocale under the tray is undone,
stylesheets parse under the C numeric locale, and cssflat reads and writes
numbers and colors without the locale, clamping NaN and huge channels. A
font is checked table by table before stb_truetype sees it, and a --font
that cannot be read falls back to Aileron. A missing icon draws as nothing
rather than a white square, and an icon-only button draws its icon through
its CSS look. On the web, the page's key event no longer takes the event
type every wake pushes.

The BSD jobs: SDL's dlopen notes are left out on the BSDs, as OpenBSD
refuses a program whose note segment passes 1 KB; libm is linked into every
target on Unix rather than plutovg alone; and the smoke run picks its video
driver with the new --video flag instead of an environment variable.

.confirm_close and reaktor_set_confirm_close ask a question in a modal
floater, with Cancel and Quit, before a quit that closing could refuse,
bringing a minimized window back to ask it; the showcase's Popups page turns
it on. The sidebar takes copy-outline for Layout, chatbubble-outline for
Popups and color-fill-outline for Styling. Comments are trimmed again to the
ones that guard a trap, the screenshots are retaken, and PERFORMANCE.md's
module sizes and UI Automation count are measured again.

Verified: the seven tests pass, the 24 launchtest hold probes match the
last run, and new launchtest modes cover a window's keys, drops, animation,
title, theme, wakes, one change a frame, a drag, 200 open-and-close cycles,
its picker and a close under it, and the question both answered and
canceled. Each step was diffed against the previous sweep of every page in
both themes; the last differs only by the Popups page's new section and the
Diagnostics page's live numbers, and the accessibility-off build draws
byte-identical pixels and dumps. The web build passes its typing harness
and the wake, floater and toast checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:44:13 +02:00
adminandClaude Opus 5.5 0de1f814aa Layers, a tray and a sidebar
An application now owns main and makes one call, launchApp, declared in
include/reaktor/launch.h with its hooks (page, start, key, closing, stop,
file_opened) and the quit reasons platform/lifecycle reports: the window, the
app, the console, a signal, the session.

Above the page sit floaters, dialogs inside the main window whose modal kind
holds everything under it, and toasts. reaktor_window_open opens real windows
with their own renderer, and reaktor_tray_open puts the icon in the system
tray with a menu; SDL's tray is built again for it. reaktor_sidebar and
reaktor_tabs share one spec. The showcase moves its pages into a sidebar, with
the scheme and the titlebar switch at its foot, around a rounded panel, and
its tray menu shows the window, sends a toast and picks the theme.

Along the way: the icon cache gives up its stalest slot instead of drawing
white squares once full; a toast honors each side's padding; the click that
activates a window lands everywhere but macOS; cssflat works out
color-mix(), which reaktor.css uses for stronger light hovers and a tinted
current sidebar entry; the web link reads its asset list from a response
file, which had outgrown cmd.exe. Comments are cut to the few that guard a
trap, and every Markdown file is rewritten, DOCUMENTATION.md with a catalogue
of every widget, container, layer and helper.

Verified: the seven tests and lt3 pass, and the 24 launchtest hold probes give
their expected results. Every page in both themes was reviewed by eye and
diffed against the last baseline's accessibility dump, which lost no node.
The web build was captured on four phone configurations, with the Android
typing harness passing 62 of 62 checks; the tray menu, toasts and secondary
windows were driven through Win32 and UI Automation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:30:51 +02:00
adminandClaude Opus 5 458d11aa49 Text past Latin-1, and the showcase in three languages
Two optional modules, each an interface library with a _none twin and a
REAKTOR_<NAME> option that defaults on, so an application that wants neither
links neither.

Locale reads a catalog per language from assets/locale, or compiles them in
with REAKTOR_LOCALE_EMBED: key = value lines, gettext plural rules, and
numbers, money and dates written the way each catalog says. The atlas bakes
what the catalogs use that Aileron has, and --lang picks the language.

Text draws what the atlas cannot. A string with any character the atlas lacks
is measured and drawn by core/text/text.c instead of Nuklear: direction by
mojibake's bidirectional algorithm, shaping by kb_text_shape, glyphs from the
first font that has them, rasterized at the size they are drawn, and lines
broken by UAX #14. Both libraries come in as submodules. M PLUS 1p is vendored
with its OFL notice for the showcase's Japanese, and --font-fallback adds more.

The showcase gains a Translations page: the opening of The Ugly Duckling in
English, Polish and Japanese, beside a date, a number, money in three
currencies and a plural count, each formatted the way that language writes it.

A clean-up pass followed: shared helpers for what was duplicated, and comments
cut to the few one-liners that guard against a bug. Screenshots and
--a11y-dump of all ten tabs, of Polish and Japanese, and of a right-to-left
sample were compared before and after it and are byte-identical. The seven
tests pass, localetest and texttest among them, and the native and
WebAssembly builds both link.

The docs follow. DOCUMENTATION.md covers both modules and the formatting keys,
DEMO.md shows each of the four applications, benchmarks/README.md becomes
BENCHMARKS.md, PERFORMANCE.md drops the per-machine CPU column and the history
of the old chart, and the GitHub Pages workflow is added. The showcase and
bench windows are titled Showcase and Bench, as notepad and simple already were.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 22:01:24 +02:00
Roman ChojnackiandClaude Opus 5 ae6eb26ba7 The software rasterizer was not the expensive part
A panel background arrived at SDL as two textured, alpha-blended triangles
covering the window, because nk_convert flattens every shape to triangles and
nk_font_atlas_end points tex_null at the atlas. A GPU does not care. A CPU
rasterizer pays for all three words. The same coverage, measured three ways:
16.38 ms textured and blended, 6.95 ms untextured, 0.12 ms as a fill.

So the renderer now recognises what it is being asked for. Six indices, no
texture and one color across all of them is an axis-aligned quad, and an
axis-aligned quad is a fill. Opaque fills skip the blend, because source-over
with an alpha of one is the source and the read-modify-write buys nothing.
Both are software-only: hardware draws triangles for free, and its output
stays identical to the bit.

A frame of the benchmark goes from 11.48 ms to 2.12 ms, an empty window from
8.06 ms to 0.54 ms, and PERFORMANCE.md's software bar from 67.3% of a core to
16.4% - under Flutter's 16.6%, at a ninth of its memory. The chart, the table
and the paragraph that explained why a CPU rasterizer should be the most
expensive thing in it are all updated from one fresh run.ps1 pass.

The test cannot match a rounded rect or an antialiased edge, because Nuklear
feathers those into more geometry than six indices. Fills thinner than two
pixels keep their blend: a one pixel rule lands a shade differently without
it, which the separators on the Buttons page showed as eleven thousand pixels
off by sixteen, and they cost nothing to draw either way.

Verified against pixels rather than reasoning. Four showcase pages, both
renderers: direct3d11 bit-identical, software within one least significant bit
on at most 0.3% of pixels, and every a11y dump unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122RRMSnVSpaux9Fw1yb2qi
2026-09-15 10:46:57 +02:00
adminandClaude Opus 5 950ce78870 A stylesheet decides how big things are, not just what colour they are
The Styling page claimed that swapping tiny.css for simple.css changes the
application. It changed the colours and nothing else, and the accessibility
dump proved it: byte-identical with the sheet swapped. Six things had to be
true before it moved.

  * Read the whole box. resolve() took padding-left and border-top and threw
    the other six sides away, so `padding: 4px 12px` rendered as 4px round.
  * Size from the rule. Every widget's height came from the page - .box.h =
    30 - and CSS could only decide where the label sat inside it. It is the
    CSS box model now: content, padding, border, with min/max as bounds and
    the sheet's margins applied.
  * Compute em against the sheet's own base. cssflat converts em and rem
    itself, because libcss has no such unit, and it read the base from
    `html { font-size }` alone. simple.css sets it on body - 1.15rem, 18.4px
    - so every length in that sheet came out 15% small.
  * Type from the rule. Ten call sites said reaktor_font(app, 13, 0); they
    name a selector now, and .api-line stopped being dead weight in our own
    sheet.
  * Attribute selectors reach a widget. cssflat rewrites input[type=range]
    into input.type-range rather than discarding the rule, which is what it
    used to do with most of a document sheet's control styling.
  * :hover and :active are read rather than computed. :hover supplied a
    background and :active nothing at all - it was the base colour ten per
    cent darker, which is a decision a stylesheet is entitled to make.

Measured against the browser's own computed style on simplecss.org/demo:
padding 9.2, border 1, radius 5, margin 0 0 8 0, type 18. We agree on all
five now; we did not agree on any of them before.

Then /code-review at max effort over the result, ten angles. Fourteen of its
fifteen findings are fixed here, the worst of them mine from earlier in the
same work:

  * resolve() handed CSS percentages back as pixel counts. simple.css puts
    `max-width: 100%` on every control, so max_width came back as the float
    100 and would have clamped any text-sized widget to a hundred pixels.
    Every length passes a unit gate now.
  * A narrow rule replaced the element rule instead of cascading under it, so
    `input[type=range] { padding: 0 }` cost the slider all of input's box.
    That 37px-to-18px change was demonstrated as a feature; it was half a bug.
  * The base style cascaded html and then body into one computed style, which
    erased the first pass and leaked font_family on every theme change.
  * line-height told a ratio from a length by being under 4. libcss already
    tags it, and `line-height: 150%` was becoming a 150px line box.
  * base_length trusted any unit it did not recognise as pixels: 12pt read as
    12, and `1.15rem !important` as 1.15.
  * font-weight worked at exactly one size, because the bold face was baked
    once at 16px - so the h4 and th rules added by this very work rendered
    regular. Bold is baked at every step now: atlas 512 KB to 1024 KB,
    private memory 6.9 to 7.4 MB. That is the price of the feature existing.
  * reaktor_fill_round seamed. Cutting a rounded rect into pieces in floats
    and letting the renderer snap each one could round two edges apart and
    leave the row between them unpainted. It snaps the shape first now, so
    the pieces meet exactly - and the three non-overlapping bands could come
    back, which also stops a translucent colour being composited twice.

The fifteenth is skipped and said so: five selector resolutions per button
per frame is waste, not a defect, and the cache has headroom.

Also here, and unrelated except in time:

  * No environment variables. All 21 reads are gone; getenv appears nowhere
    in our sources. The two that were verification tooling rather than
    settings became flags - --shot, --a11y-dump, --theme, and --tab/--scroll
    through sample_args - taken out of argv before the application sees it,
    so the notepad still opens the file named on its command line. Deleting
    the overrides collapsed what they guarded: the renderer block was thirty
    lines choosing between five modes and is now two.
  * third_party is external, moved with git mv so the eight gitlinks follow.
  * British spelling to American, 113 replacements. Seven identifiers went
    with it, two of them public: reaktor_colour_spec and reaktor_colour_pick
    are reaktor_color_*, and REAKTOR_CENTRE is REAKTOR_CENTER. LICENSE and
    the font's notice are untouched - editing a licence's words is not a
    spelling decision.
  * README gains a pitch, a development warning, a Features list and a
    smaller Usage sample that was compiled before it was published; the three
    applications move to docs/DEMO.md.

Clean build, five tests, and every page under both sheets and both schemes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 11:17:06 +02:00
adminandClaude Opus 5 d4e0bf9c4c Three applications, a tree without prose, and six bugs it was hiding
Structure. Onlay and simple.css become submodules; the vendored copy of Onlay
under onlay/ goes. The samples split into samples/showcase, samples/notepad and
samples/simple, sharing runtime/ and core/ through a reaktor_runtime static
library, and sample.h grows a window spec so an application says how big it
wants to be instead of inheriting the showcase's 1100x680. branding/ moves into
assets/icons and assets/rest.

Prose. Every comment is gone from the tree's own sources, and put back only
where a reader would otherwise be misled: the one-frame lag, the settling
bound, the Nuklear behaviours, the menu row spacing MENU_H counts on. About
4,850 lines of narration removed. third_party/ is untouched, and the vendored
nk_sdl3_renderer.h keeps its licence header and its REAKTOR markers, which are
the only record of how it differs from upstream.

Six bugs found on the way, each verified against the running application
rather than against a reading of the source:

  * REAKTOR_SCALE never worked. The panel was laid out from SDL_GetWindowSize,
    which is already divided on a real HiDPI display but not under a forced
    scale; and draw.c set the font's logical height before nk_sdl_font_stash_end,
    which bakes and puts the device height back. At 2x every label measured and
    drew twice its size and the tab strip fell off the window.
  * rss_mark() wrote runtime/app.c's copy of g_rss and the Diagnostics page read
    core/ui/widgets.c's, because both were statics in a header included by ten
    translation units. Every row of "What startup costs" reported 0.0 MB.
  * The WASM preload and the macOS bundle work out which icons to ship by
    grepping the sources, and both were still looking where the sources used to
    be. They shipped 3 of 43 glyphs.
  * The Styling page's progress bar shared a value with the Inputs page's but
    never got .modifiable, so it alone ignored the pointer.
  * REAKTOR_STATS wrote build/stats.log relative to the process's cwd - the one
    path in the tree that skipped reaktor_path().
  * UIA re-announced the same focused element on every frame the diff was
    non-empty; the AT-SPI and web bridges already guarded it.

Simplification. No unused variable, unreachable branch or uncalled static
survives /W4 across our sources. Eleven copies of the box-default rule collapse
into box_default/row_height; the menu chrome, row height and item become
reaktor_menu_* so the two samples cannot drift apart again; twenty hand-inlined
token lookups become reaktor_token; three private copies of read-whole-file
become reaktor_read_file. reaktor_path resolves the asset root once instead of
walking the tree on every call, the notepad stops re-hashing its document every
frame, and Diagnostics samples process memory twice a second instead of per
frame - it was inflating the timings it prints.

The accessibility dump is unchanged through all of it except where a change was
intended, which is what made the whole pass reviewable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 01:34:32 +02:00
adminandClaude Opus 5 af9e8bb15a The last five pages declare themselves
Display, Layout, Popups and Diagnostics, and with them the shape of what a
declared page can and cannot reach. The tree grows from about sixty nodes a
page to 95-100, because the conversion reports things the imperative code
never did: 24 table cells, a progress bar, and all 26 diagnostics readings.

Layout could not be converted at all. It is a page *about* nk_layout_row_*,
which stage 08 deletes, so its sections kept their concepts and changed their
vocabulary: rows and columns, wrapping, widths and shares, floors, free
placement. REAKTOR_FREE was missing - the direction existed and the frame's
own root used it, but no scope macro exposed it.

Popups converted only its page-level widgets. A popup body is another Nuklear
panel and a declared tree belongs to one panel. Groups, trees, list views and
charts stay imperative for the same reason or for want of a spec. 56
nk_layout_* calls remain and every one is inside such a panel; none is left
in the open page.

FOUR ADDITIONS TO THE API, each forced by a page rather than designed up
front. reaktor_box_rect answers where the innermost container landed, because
a row is not a widget and the table's zebra had nothing to ask. .value makes
a label a readout - a reading is a name and a value, not a sentence a reader
has to parse. .silent reports no node, for the columns of a reading that is
already reported as one thing; it is not the same as muting, because a muted
note answers 0 and the id is what the layout keys a box by, so two muted
siblings would share one slot. And a top-level container with no width now
takes the panel's content region rather than peeking nk_widget_bounds - which
removed 27 peeks from the sample and dissolved the rule that two declared
blocks side by side had to be one container.

THE DUMP EARNED ITS KEEP TWICE, by refusing to settle at all. An id is
computed from the shape of the tree, so a node reported only on the frames
where its rect was known renumbered everything after it, which took the node
away again: it oscillated and never converged. And a box is found again by
its name, so every diagnostics reading - whose text changes every frame - was
a box the layout had never seen. Both are the library's problem now rather
than a page author's: settling is bounded at 16 frames, past which the frame
stops asking, prints which box is missing and why, and lets the page draw
what it has. An application spinning at 100% that never puts anything on
screen is the worse failure.

FIVE BUGS FOUND BY RUNNING IT, four of them older than this stage.

nk_spacing computes rows = (index + cols) / columns and allocates that many,
so the last widget of a full row wrapped and reserved an entire second row
nothing drew into. Every full icon row carried 39px of dead space.

35 of the 421 outline icons rendered black. The recolouring matched
style="stroke:#000" but not the attribute spelling, and gave a fill only to
<path> - calendar-outline does both, so nothing in it was substituted. The
fill now goes on the <svg> element and is inherited by every unpainted shape
whatever its tag, while anything saying fill:none still overrides it.

An icon button sized its glyph from a box that fills and so has no height,
got 0.6 of nothing, and let nk_button_image stretch it across the button.

A wrapping row's lines touched: gap reached the main axis but not the cross
one, in the arrange and in both intrinsic-size calculators.

And button labels sat four and a half rows low. reaktor_fit_label computes
the right padding and pushes it; push_button_style then pushes the
stylesheet's over the top of it, so the fit never reached Nuklear on any
css_button path. Nuklear insets content by padding + border + rounding a
side, which on a 30px button is a content rect with negative height, and a
label centred in a rect with no height is drawn from its top edge. The clamp
is in push_button_style now, where the padding is decided and nothing can
overwrite it.

Three fixes for that one shipped on reasoning from Nuklear's source and
changed nothing on screen; one framebuffer readback found it in a single run.
Measured after: the x-height band's centre lands on the button's centre
exactly. The glyphs also move up by the distance from the line box's middle
to the x-height band's middle - Nuklear bakes each offset half a pixel low,
and a line box reserves room under the baseline whether the string uses it or
not. That is applied to the outlines once, in the atlas this application
bakes, so every widget is corrected by the same amount.

Six new checks in laytest for the wrap gap; 46 pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 15:02:36 +02:00
adminandClaude Opus 5 2dd4ad45df Split into a library, and give the shortcut table a voice
Stages 00-05 of the declarative refactor. Nothing about how the
application looks or reads has changed: all 14 accessibility dumps
(7 pages x 2 themes) still match, to the pixel.

Structure. src/main.c is gone, split by function rather than by
platform: core/{a11y,base,css,render,ui}, platform/a11y, runtime,
samples, tools. No library header names a sample type any more -
showcase_state, the tab enum, reaktor_tab_names, set_tab and the
REAKTOR_TAB/REAKTOR_SCROLL reads all live in samples/ now.

Onlay. A layout engine forked from randrew/layout (MIT), in onlay/,
bound for its own repository. Plain C99, because upstream needs C++
under MSVC; plus weighted tracks with floors, and gap. Grid needed no
code at all - rows carrying the same weights put their columns in the
same place. 231 diff lines against upstream, each marked ONLAY:.

Keyboard. core/ui/keys.c matches a chord exactly and ignores Caps,
Num, Scroll and AltGr, which fixes two live bugs: Ctrl+Alt+Tab fired
the Ctrl+Tab binding, and Caps Lock spoiled it. Bindings are a table
in samples/shortcuts.c, and the runtime's 23 lines of them became 2
of dispatch.

Announced. A node carries its chords as one ARIA string and all four
bridges publish it: aria-keyshortcuts, UIA AcceleratorKey, the AT-SPI
keyshortcuts attribute, AXKeyShortcutsValue. Read back through a real
UIA client on Windows. Publishing the table also forced a binding
change - Cmd+Tab is the macOS app switcher and Win+Tab is Task View,
so neither ever reached the app, which was survivable until the table
began telling a screen reader what works.

BSD. All three BSDs now report resident memory through sysctl, and
FreeBSD and NetBSD find their install path the same way. OpenBSD
exposes no such path by design, so it reconstructs one from argv[0]
and checks it before believing it. None of that is compiled here:
there is no BSD on this machine.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 00:20:42 +02:00