Repository navigation
v0.30.2
Added
Core
EventContext::focus_lost_to_own_menu. A widget'son_focus(false, …)
handler can tell that focus went into a context menu opened for it, or for
a part of it, from a right-click, the menu key, Shift+F10 or an assistive
technology. That focus is only lent: Escape or a row of the menu gives it
back, Tab from the menu goes where Tab from the widget goes, and a move
from the menu to another widget (Tab, a click on another control, a request
from the app) goes through the widget first. A widget disabled meanwhile, or
whose menu closed giving focus to nobody, gets an ordinary loss alone. So
the loan always ends with a focus gain or an ordinary loss.AnnouncerHandle, to speak to a screen reader away from any context.
BuildContext::announcer_handle()(andWidgetTree::announcer_handle())
hands out a cloneable handle whoseannounceandannounce_withqueue a
message for the tree's next accessibility update, where it joins the
framework's announcer exactly as one queued throughctx.announcedoes. For
a widget that learns what to say in a frame tick, a paint pass or a handle
method an application calls.
Text
RichTextEngine::place_inline_runandinline_run_glyphs. Lay out a
run of text that is not in the document in a flow of its own, in the format
of the text before the caret and at the editor's font scale, and place its
glyphs after the caret on the caret's baseline. Refused, with an
InlineRunRefusalsaying why, where text follows the caret on its line,
where the run does not fit, in right-to-left text and outside the document's
own column.
Widgets
- An inline suggestion in
RichTextEditor.EditorHandle::set_inline_suggestion
shows anInlineSuggestionafter the caret: text that is not in the
document (the rest of a name the writer is typing, say), drawn in the
secondary text colour, in italics when asked. Tab accepts it and Escape
dismisses it, throughon_inline_suggestion_acceptedand
on_inline_suggestion_dismissed; the application inserts the text itself,
with its own formatting and undo grouping. It is never saved, found,
exported, copied, undone or read out as the paragraph's text, and the editor
clears it on its own when the caret moves, a selection opens, the text
changes, focus leaves, the editor turns read-only or an input method starts
composing. Set again after each letter fromon_change, it never leaves the
screen, and its announcement, which the application provides, is spoken once.
It is drawn over the line rather than laid out into it, so it is only shown
where nothing but whitespace follows the caret on its line and it fits, in
left-to-right text outside tables and block quotations; elsewhere
set_inline_suggestionreturnsfalseand Tab and Escape do what they
always did.
Fixed
Widgets
- An edit in a text field outlives the field's own context menu. Opening
the menu of aTextInputorTextInputField(and of the fields inside
SpinBox,DateEdit,TimeEditand the other editors built on it) ran
on_commit_fnandon_blur_fnas a blur, so an application that renames
a row in place ended the edit before Cut, Copy or Paste could be chosen.
Neither runs when the menu opens now, whether a right-click, the menu key
or Shift+F10 opened it. Escape or a row of the menu gives the field back
with the edit alive, and leaving the menu for another control, by a click
or by Tab, still ends the edit once, as a click elsewhere always has. In a
window whose only Tab stop is the field, Tab from its menu gives the field
back like Escape. A commit already made for a toolbar click is not made
again on the way out, and a reveal-while-typing password field's Copy still
copies.
Full Changelog: v0.30.1...v0.30.2