Form sections hold their children (win32, UIKit); win32 paints gradients, orders zstacks, keeps a tooltipped widget's text - #175
Open
nicolas-maman wants to merge 2 commits into
Open
nicolas-maman wants to merge 2 commits into
nicolas-maman wants to merge 2 commits into
Conversation
…nts, orders zstacks, keeps a tooltipped widget's text The styled example showed its title and its buttons and nothing between on Windows. Five defects, all fixed: - section()'s children went into the title label: the DSL returns handle + 1 as the inner box, and win32 and UIKit registered the title there. The inner box is registered first now. - A form, a section and a navstack are stacks (create_stack) with a kind of their own, and every "is this a stack" test in the win32 layout named the three plain kinds: a form measured as 0x0 and requested no layout. w32_is_stack at every site; measure_subtree by orientation. - style_bg_gradient was stored and never painted. GradientFill in the container's erase; a label, spacer or rule inside paints the slice of the gradient under itself (w32_erase_ground; WM_CTLCOLOR with a hollow brush). - A zstack's later child was UNDER the earlier one (add_child pushes new children to the bottom of the Z order for enumeration in creation order) and margins were ignored. Children are raised in creation order, clip their lower siblings, and keep their margins; the ground behind a label over a panel is the panel's. - set_tooltip freed the widget's text cache: a button with a tooltip reported "" to the driver. Verified natively: runtime test; 76 headless specs (the three that fail are the GL-less and env-gated runs); 14 on-screen specs; captures of the styled example and a gradient/zstack probe.
A single read at a fixed 120ms raced the first layout on a loaded CI runner (GTK4 under Xvfb printed 'left panel width = 0'), and 0 is not a measurement of anything. Polled every 40ms until the pane has a width, with a ceiling so an app that never lays out still reports and quits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
styledexample on Windows showed its title and its buttons and nothing between. Five defects behind that, all fixed and verified on screen.section()'s children went into the title label (win32 and UIKit). The DSL returnshandle + 1as the box children go into — the inner container GTK4 and AppKit register right after the frame. These two backends registered the title there, so every field and toggle of a section was parented to a label. The inner box is registered first now (then the title, which is still shown first).create_stackwindows with a kind of their own, and every "is this a stack" test in the layout listed the three plain kinds: a form measured as 0×0 (its parent read the window's current size), requested no layout and did not show. One predicate,w32_is_stack, at every site;measure_subtreegoes by orientation rather than kind.style_bg_gradientwas stored and never painted on win32. The container's erase paints it (GradientFill), and a label, spacer or rule inside paints the slice of the gradient under itself (w32_erase_ground;WM_CTLCOLORanswers with a hollow brush after painting the slice), so a caption on a gradient header is text over the header rather than a box of one colour.add_childpushes every new child to the bottom of the Z order (right for a row or a column, so enumeration reads in creation order), which in a zstack put the label added after the panel under it, with the two painting over each other in whichever order Windows chose. Children are raised in creation (handle) order and clip their lower siblings; a child's margins inset it (margin_ofover a panel, as on GTK4's overlay);w32_ground_ownerlooks through a zstack's lower siblings so a label over a coloured panel paints the panel's colour behind its text.style_tooltipwiped the widget's text on win32.set_tooltipfreed the text cache, so every button with a tooltip reported""to the driver and to the a11y name fallback.Verified natively: runtime test; 76 headless driver specs (the three that fail on this box are the GL-less
gpuview_demoand theAETHER_UI_CHROME/AETHER_UI_TOOLTIPenv-gatedtumbling_cube/vg_tooltip, as before); 14 on-screen specs; captures of the styled example and a gradient/zstack probe.