Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- **A form section's children go into the section, on win32 and UIKit.**
The DSL's `section()` returns handle + 1 as the box its children go
into, the inner container GTK4 and AppKit register right after the
frame; those two backends registered the TITLE right after the section,
so every field and toggle of a section was parented to a label and
absent from the window. The inner box is registered first now.
- **win32 treats forms, sections and navstacks as the stacks they are.**
Every "is this a stack" test named the three plain kinds, so a form
measured as nothing (its parent read a 0x0 window), requested no layout
and did not show. One predicate, `w32_is_stack`, at every site;
`measure_subtree` goes by orientation rather than kind.
- **win32 paints `style_bg_gradient`.** The gradient was stored and never
drawn. A container's erase paints it (`GradientFill`), and a label, a
spacer or a rule inside paints the slice of it under itself
(`w32_erase_ground`, `WM_CTLCOLOR` with a hollow brush), so a caption on
a gradient header reads as text over the header.
- **win32 zstack: the last child is on top, and margins hold.** add_child
pushes every new child to the bottom of the Z order (right for a row or
a column), so in a zstack the label added after the panel was under it
and the two painted over each other in whichever order Windows chose.
Children are raised in creation order and clip their lower siblings; a
child's margins inset it (`margin_of` over a panel), as on GTK4's
overlay. A label over a coloured panel takes the panel's ground
(`w32_ground_owner` looks through a zstack's lower siblings), not the
zstack's.
- **win32 `style_tooltip` no longer wipes the widget's text.** It freed
the text cache, so every button with a tooltip reported `""` to the
driver and to the a11y name fallback.
- **win32: a canvas grows with its window, and `on_resize` fires.**
`canvas_create`'s width and height are the canvas's natural size on
every backend (GTK4 expands the drawing area past its content size,
Expand Down
6 changes: 6 additions & 0 deletions backend/aether_ui_uikit.m
Original file line number Diff line number Diff line change
Expand Up @@ -4035,13 +4035,19 @@ int aether_ui_form_create(void) {
f.translatesAutoresizingMaskIntoConstraints = NO;
return register_widget_typed((__bridge void*)f, AUI_FORM);
}
// The DSL's section() returns handle + 1 as the box its children go into
// (the inner container GTK4 and AppKit register right after the frame), so
// the inner stack is registered before the title: it used to be the title,
// and a section's fields were added to a UILabel.
int aether_ui_form_section_create(const char* title) {
int section = aether_ui_vstack_create(8);
int inner = aether_ui_vstack_create(8); // handle + 1: the children's box
if (title && title[0]) {
int header = aether_ui_text_create(title); // real text widget the driver sees
aether_ui_set_font_bold(header, 1);
aether_ui_widget_add_child_ctx((void*)(intptr_t)section, header);
}
aether_ui_widget_add_child_ctx((void*)(intptr_t)section, inner);
// Mark it a form section for the driver's kind reporting.
if (section >= 1 && section <= widget_count) widget_types[section - 1] = AUI_FORM;
return section;
Expand Down
Loading
Loading