6 Commits
Author SHA1 Message Date
Liu 093a6a1e35 feat: add explicit window lifecycle and per-window event routing
- add the window API and lifecycle design specs
- lcui_init no longer creates a window; settings loading is explicit
- add lcui_window_* create/bind/geometry/state/show/close api
- replace display modes with window options and quit-on-last-window
- add per-window event scopes and window-based pointer/keyboard routing
- keep pending updates for widgets appended during a frame
- migrate examples, tests, previews and internals docs
- remove default-scope focus and mouseover getters
2026-11-16 00:03:50 +08:00
Liu 855855263b feat(css): add align-self support for flex items
- register align-self and resolve auto against the container align-items
- apply per-item alignment to measuring, cross-axis layout and static positions
- align item media icons with the first title line
2026-11-14 00:31:15 +08:00
Liu 1f46778893 fix(ui): stabilize layout measurement and style refresh
- restore intrinsic sizes before measuring flex and block children
- resolve percentage widths against indefinite parents as auto
- reflow parents when child content changes and refresh background geometry
- ignore hidden flex items in gap insertion and use spec static positions
- keep text paint size in sync with the current capture scale
2026-11-13 21:56:39 +08:00
Liu 20b3221cfd fix(ui): stabilize flex layout and add layout contract tests
- merge own sizehint with child layout extent; keep sizehint callable
- support cross-axis auto margins and flex-basis content/percentage
- fix space-evenly gap, canvas destroy, breadcrumb intrinsic width and dynamic text intrinsic refresh
- add flex contract, sizehint, empty layout and field layout suites
- move empty/field scenarios to theme-independent test fixtures
- document layout coverage and known gaps
2026-11-08 00:20:31 +08:00
Liu 53bebe0905 docs: index LCUI internals in AGENTS and project docs
Move code-mechanism reference out of the lcui skill into docs/internals: overview, settings/headers, widgets/Portal/events, CSS, and the layout engine. Add docs/testing/layout-tests.md for the layout test conventions. AGENTS.md now indexes these documents and links each duplicated rule section to its detailed doc. Table display values are parsed but have no layout implementation on the current mainline.
2026-11-08 00:20:28 +08:00
Liu 22c883b79e fix(ui): wrap and stabilize flex column text layout
Persist parent width constraint (source + generation) and wrap text at it; six-pass flex layout with <=1 reflow per child; fit-content clamp for centered auto-width children; re-derive centered column cross width from constraint on standalone reflow; fixed-cross flex containers ignore child size hint. Record row main-axis allocation as a persisted constraint so a flex:1 child keeps its width across standalone reflow. Measure/layout phase split, measurement cache invalidation test, and sizehint capability flag so zero-size results are not mistaken for missing sizehints. Add layout engine rules doc and integration tests (wrap, empty, empty-basic, field-checkbox remount, empty media icon).
2026-11-08 00:20:27 +08:00