Skip to content

fix(#180): a pushed fill gives a solid face - #187

Merged
octalide merged 4 commits into
devfrom
fix/180
Oct 1, 2026
Merged

octalide merged 4 commits into
devfrom
fix/180

Conversation

@octalide

@octalide octalide commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #180

Plan

A paint's fill_to follows its fill. Every write of a fill through the theme's field layer also writes fill_to with the same value, so a fill alone is a flat face, and fill_to written with it (in any order) or after it makes the gradient.

  • theme.follower(r) (fill -> fill_to of the same paint) and theme.follows(r) name the relation once, at the Ref level. put stays the raw single-field write.
  • theme.set, set_path and TOML apply write the follower.
  • sheet.write (push, push_class) writes and saves the follower, so a pop restores both.
  • Operations that write several fields at once write following fields last, so the result does not depend on listing order: push_class takes a second pass, read_into a third (PASS_FOLLOWS).
  • save writes fill_to after a written fill whenever the two differ, so a shaded face with a changed fill saves and loads back the same.
  • Documented in the theme and style module docs, Paint, the fill_to FIELDS row and the README (field table regenerated to match).

Decisions the issue left open

  • Representation: write-time following, not a stored "explicitly set" flag. Paint keeps its layout and the box painter is unchanged.
  • The theme editor writes through theme.set, so dragging a fill slider now flattens that paint's fill_to as well, the same rule as every other path.
  • The gallery's "Pushed green and round" button is solid through the fix itself (it only showed a gradient under a shaded look like dark). The gallery golden is the last frame of section 0, so it does not change and was not regenerated.

Ran

mach test . --filter style|theme|editor|widget, mach test demo/gallery, mach build . -p release, mach fmt --check on the root and demo/gallery.

every write of a fill through a path, set, set_path, TOML or a class also
writes fill_to, so a fill alone is a flat face, and fill_to written with
it or after it makes the gradient. a class or document writes fill_to
after every fill whatever the order, a pop restores both, and a save
writes fill_to after a changed fill whenever the two differ.
@octalide
octalide marked this pull request as ready for review October 1, 2026 16:36
@octalide
octalide merged commit e809bbd into dev Oct 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: a pushed fill gives a gradient unless fill_to is pushed too

1 participant