List selection visible on every backend; win32 layout propagates up, canvases grow, pickers report their selection - #174
Merged
Conversation
…iners above a changed stack out again .aui-row-selected was painted by GTK4's stylesheet and, on AppKit, Win32 and UIKit, only reported to the driver: a listbox's selection could be read by a spec and not seen by a user. Each backend now paints its system's selection tint over the row's own ground (Win32 the accent as a tint the labels stay legible on, AppKit unemphasizedSelectedContentBackgroundColor, UIKit tertiarySystemFill) and takes it off when the class leaves. On win32 a child added to a nested stack (a listbox's rows go into the each container inside the app's column) changed that stack's natural size and nothing above it was laid out again: the column kept the container at the height it had when empty and 200 rows were drawn over the buttons under it. w32_request_layout climbs to every container whose size can change, stopping after a scrollview or a stack pinned in height, the bounds set_hidden's synchronous climb already used. Verified natively: runtime test, 74 headless specs unchanged against main, rebuild_bench unchanged, captures of listbox_demo with rows added and a row selected, then moved with Down.
canvas_create's width and height are the canvas's natural size on every backend; win32 stored them as the pin width()/height()/canvas_size set, so a canvas created 80x80 stayed 80x80 in a 700px window and canvas_on_resize never fired. The natural size is the measure's answer now (w32_canvas_natural); a pin is still a pin. tests/resizecb_demo passes on Windows. The driver's text for a picker was always empty, a combo box having no window text to cache; the selected item is cached after every change of selection. CB_SETCURSEL sends no CBN_SELCHANGE, so picker_set_selected invokes on_change itself when the index changed, as the other backends do. tests/picker passes on Windows. 21 canvas specs and the binding specs pass headless.
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.
Four defects found by looking at the screens on Windows, three of them with a cross-backend angle.
A selected list row is visible on every backend
.aui-row-selectedwas painted by GTK4's stylesheet and, on AppKit, Win32 and UIKit, only reported to the driver: a listbox's selection could be read by a spec and not seen by a user. Each backend now paints its system's selection tint over the row's own ground and takes it off when the class leaves:w32_selection_ground: a quarter over white on a light system, a good third over the dark ground on a dark one), throughw32_own_groundsoWM_CTLCOLORSTATICgives the labels the legible text colour automatically;unemphasizedSelectedContentBackgroundColorinaeui_apply_state_bg(keeps the app's label colours legible in both appearances);tertiarySystemFillColor, the row's own colour kept and restored.win32 lays the containers above a changed stack out again
A child added to a nested stack (a listbox's rows go into the
eachcontainer inside the app's column) changes that stack's natural size, and the column has to place what follows it lower. The layout request stopped at the nested stack: the column kept the container at the height it had when empty, and 200 rows were drawn over the buttons under it (listbox_demoafter "Add 200").w32_request_layoutnow climbs to every container whose size can change, stopping after a scrollview or a stack pinned in height — the boundsset_hidden's synchronous climb already used.rebuild_benchunchanged (0.88–0.95s on screen, 0.63–0.67s headless).win32: a canvas grows with its window, and
on_resizefirescanvas_create's width and height are the natural size on GTK4 (expand past content size) and AppKit (priority 150); win32 stored them as the pinwidth()/height()/canvas_sizeset, so a canvas created 80×80 stayed 80×80 in a 700px window andcanvas_on_resizenever fired. The natural size is the measure's answer now; a pin is still a pin.tests/resizecb_demopasses on Windows (it was on the "known local failures" list — it was a bug).win32: a picker's text is its selection; a programmatic selection fires
on_changeThe driver's
textfor a picker was always empty (a combo box has no window text to cache); the selected item is cached after every change.CB_SETCURSELsends noCBN_SELCHANGE, sopicker_set_selectedinvokes the closure itself when the index changed, as GTK4, AppKit and UIKit do.tests/pickerpasses on Windows (also on the known-failures list — also a bug).Verified natively
Runtime test; 74 headless specs against main (the remaining local failures —
gpuview_demo,tumbling_cube,vg_tooltip— are the GL-less headless run and theAETHER_UI_CHROME/AETHER_UI_TOOLTIPenv gates ci.sh sets, not defects); 21 canvas specs; captures oflistbox_demowith rows added (buttons back below the list) and a row selected, then moved with Down (the highlight follows).