You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ScrollBar arrow buttons now behave like real push buttons. Clicking one
sinks it — a single dark top/left shadow line, no highlight, the arrow glyph
nudged 1px down-right — and holding it auto-repeats the line-step scroll at
a keyboard-style cadence (a ~300ms initial delay, then every 50ms) for as long
as the button stays pressed with the pointer over it; sliding off pauses the
repeat and pops the button back out, sliding back resumes it. (#41)
EventCtx::request_tick asks the runtime to deliver another Event::Tick
without any ancestor having to forward the request — the push counterpart to Widget::wants_ticks. Like request_paint, it rides the shared EventCtx
straight back to the runtime, so a widget buried under custom wrapper widgets
can drive a transient animation on its own. It is one-shot: a widget that
needs a stream re-requests on each tick. The scrollbar's hold-to-repeat uses
it, which is why it works even inside a wrapper that doesn't forward wants_ticks (such as the filer example's FileBrowser). (#41)
FocusLabel is a caption that carries a keyboard mnemonic and moves focus to
the field beside it. Mark the accelerator with & exactly like a menu label
("Last &name:" underlines the n and binds Alt+N); pressing it
transfers focus to the next focusable widget added to the same parent — the
classic "buddy label" convention. The accelerator reaches the label even while
a sibling holds focus, via a new EventCtx::request_focus_next request that Container, Column, and Row resolve. See the new focus_form example.
(#39)
MockBackend::render_framed now paints the window background pattern behind
the content for regular (resizable / fixed) windows, matching the live
backend's main surface; dialogs stay plain, as they do on screen. The pattern
defaults to the live default (a superlight forward-diagonal hatch) and is
overridable with the new MockBackend::with_background_pattern. (#38)
List gained optional multi-selection, off by default so existing
single-selection lists are unchanged. Enable it with List::with_multi_select
/ set_multi_select: Ctrl/Cmd+click toggles a row, Shift+click and Shift+Arrow
select a contiguous range, and selected_indices / set_selected_indices read
and set the whole set. A plain press on an already-selected row defers
collapsing the selection until release, so a wrapper can drag the whole group
out — the picker and filer examples now do. To carry the click modifiers, Event::PointerDown and Event::PointerUp now include a modifiers field.
(#37)
Widgets can request the mouse-pointer shape while handling a pointer event
via EventCtx::set_cursor, choosing from the new Cursor enum (arrow, hand,
I-beam, resize handles, …). The runtime applies it after each move on both
backends (wp_cursor_shape on Wayland, CursorIcon on X11/Windows/macOS) and
falls back to the arrow when no widget asks. TextInput / TextEditor show
the I-beam over their text; every other widget keeps the default arrow. (#42)
WindowConfig::min_size sets the smallest inner size a resizable window may
be dragged to (in logical pixels). The window manager enforces the bound, so
layouts never see sizes below it. (#36)
Fixed
On Wayland, the mouse pointer could keep a stale shape when entering a window
or surface. Wayland leaves the pointer image undefined on wl_pointer.enter
and makes the client set it, but the runtime deduplicated against the last
shape it had shown and so skipped re-establishing the arrow on entry. It now
forces the cursor shape on every enter (plain motion still dedups). (#42)
On X11, dragging a ScrollBar / Slider thumb (or any captured press) no
longer stops the moment the pointer leaves the window. winit reports the
cursor crossing the window edge as a CursorLeft even while X11's implicit
pointer grab keeps motion flowing during a held button, so the runtime took it
for a real leave and ended the drag. It now ignores that leave while a button
is held and a widget is capturing the pointer, so the drag keeps tracking
up/down motion until release — matching the Wayland backend, whose compositor
sends no leave during its implicit grab. (#40)