Repository navigation
v0.18.0
Added
Core
ModalPlacementandModalRequest::placement. An in-tree modal can be
anchored by its top edge (ModalPlacement::Top { offset }) instead of
centred, for a surface whose height changes while it is open. Backed by the
newOverlayPlacement::TopCenter.OverlayPlacement::is_modalsays which
placements the tree treats as modal:CenteredandTopCenter.EventContext::send_intent_from_focus. Sends an intent from whichever
widget holds focus once the handler's other effects have been applied, a
modal dismissal included, the way a keyboard shortcut is sent. A surface
that closes and then runs a command reaches the actions registered around
what the user was working in.
Changed
Core
ModalRequesthas aplacementfield. Code building aModalRequest
with a struct literal must addplacement: ModalPlacement::Centered; the
constructors set it.
Widgets
- A text field selects all of its text only when focus arrives by Tab.
TextInputField, andTextInput,SearchField,PasswordFieldand
SpinBoxbuilt on it, used to select all on any focus that was not a
click: a dialog opening, a modal or popover closing, an application's
request_focus, a screen reader's focus. Those now leave the text and
the caret as they were. A focus the tree restores after a rebuild puts
the caret at the end.InputDialogselects its default text when it
opens; an application that wants the text selected on a focus of its own
callsTextFieldHandle::select_all. CommandPalettehas a new look. It opens near the top of the window
and is as tall as its list, up to ten rows. Each row is one line,
Category: Name, with the letters the query matched in bold, the
command's description after it, and the shortcut drawn as a key. Rows grow
with the global text scale. The arrow keys wrap
at either end; Home and End move the search field's caret.- A presented
CommandPalettelists cut, copy, paste, undo, redo, select
all and the editors' own commands, and runs them in the editor it was
opened over. An embedded palette still leaves them out. - New message
command-palette-categoryin every widget locale, the
category prefix of a palette row (File:).
Fixed
Core
- A rebuild that destroyed the focused widget put focus on the first
focusable widget of the rebuilt subtree, whichever one the user was in,
so typing after a form rebuilt went on in its first field. Focus now
comes back to the widget at the same position.
Widgets
-
Closing a dialog, popover or menu over a text field selected the
field's text, so the next key replaced it. -
A
CommandPalettewith no match rebuilt itself every frame for as long
as nothing matched, and drew its "No matching command" text outside the
panel. -
Clicking a palette row ran nothing. It now runs the command.
-
Typing in the palette moved the caret to the end after every key, and
each key or arrow press also lost an input method's composition. The
search field is no longer rebuilt as the query changes. -
A palette command reached only window-global actions. It now reaches
an action registered on, or around, the widget the palette was opened
over. -
The palette's keyboard scrolling assumed seven visible rows, and left
the highlight out of view at other densities, at other text scales and
after a scroll with the wheel. -
The highlighted palette row had no outline, so the highlight was
colour only. -
A presented palette given its own
on_dismissstayed open after
running a command. It now closes, and the hook still runs once.
Full Changelog: v0.17.2...v0.18.0