Repository navigation
v0.28.0
Added
App and platform
- Crisp text (
TeksiloAppBuilder::glyph_rendering). Text can be drawn
crisp: glyphs on whole pixels, fitted to the pixel grid on both axes and
laid out with whole-pixel widths, as Windows' classic rendering and
FreeType's full hinting draw them, with sharper stems at 100 % and lines
1 to 5 % wider. By default (GlyphRenderingPreference::FollowDesktop)
text is crisp where the user chose medium or full hinting in KDE Plasma's
font settings or GNOME Tweaks, natural elsewhere, and a change on the
desktop is followed while the application runs; a
Signallets an application's own preference decide. Zoomed text stays
natural.EffectiveGlyphRendering, in app state, says which rendering is
in effect. - Settings keys for how text is drawn. With a settings bundle, and no
value given to the builder,TEXT_CONTRAST_KEY(Standard,Stronger,
Strongest:TextContrastLevel) andGLYPH_RENDERING_KEYdecide the
text contrast and the glyph rendering, followed live: a control bound to
ctx.settings().signal_for(&KEY)changes every window.TextContrast
gains theSTRONGERandSTRONGESTpresets, and both enums anall()
listing their options for a picker. - Single instance (feature
single-instance).
teksilo::app::single_instance::acquireelects one running instance per
user, andTeksiloAppBuilder::single_instancehands it to the application.
A second launch sends its arguments, working directory and activation token
to the running instance and exits; the application receives them in
on_external_with_ctxas anInstanceMessage. The election is a socket in
the runtime directory on Linux and macOS and a named pipe private to the
user on Windows; either way only the same user's processes can take part. TerminationWatchkeepsSIGTERMandSIGHUPfrom ending the process
outside the event loop. Installed at the top ofmainand given to the
builder withTeksiloAppBuilder::termination_watch, it makes a signal that
arrives before the loop quit the application as the loop starts
(QuitSource::Signal), and only remembers one that arrives after it
(signalled(),signals_received()), so a backend's shutdown can finish.
On Windows it is inert.ctx.open_uri(uri)andctx.open_path(path)open a link or a file with
the desktop's handler (xdg-open,open,ShellExecuteW), never through a
shell.javascript:,vbscript:,data:andfile:URIs are refused. An
OpenUriHandleregistered in app-state replaces the desktop's handler, for
tests and for applications with a route of their own.- Icons from the desktop's icon theme.
IconWidget::themed("document-send-symbolic")draws an icon by its
freedesktop name on Linux and BSD desktops: symbolic icons are tinted,
full-colour ones keep their colours, and.fallback(icon)is drawn where
the theme lacks the name or there is no icon theme.
teksilo_platform::icon_themeis the lookup itself.
Widgets
TextWidget::text_align(TextAlign)places each line of a label
(Leading,Center,Trailing, following the layout direction), so the
lines of a wrapped sentence can be centred.TextAlignnow lives in
teksilo_canvasand the prelude;teksilo_scene::TextAlignis the same
type.RichTextEditor::fit_width(true)makes an editor or a read-only viewer
as wide as its text, for chat bubbles and captions.RichTextEditor::text_style(..)gives the editor's unformatted text the
size and family of a theme text style, following theme changes. Sizes a
document names are kept.ListView::keep_position_on_insert(true)keeps the row at the top of
the viewport in place when rows are inserted or removed above it, such as a
chat history loading older messages at index 0.StandardListItem::label_fills_widthand
StandardTreeItem::label_fills_widthlet the label column take the row's
free width, so alabel_slotand the subtitle row end at the row's end.
Settings and i18n
AppPaths::state_dir()andcache_dir()(withcreate_state_dir()and
create_cache_dir()), for log files and files that can be rebuilt. On
Windows and macOS the state directory is the data directory.DateFields::WeekdayandDateFields::MonthDayfor
TeksiloDateTimeFormatter, rendered by ICU in the locale's own form
("Monday", "lundi", "August 31", "31 août").
Changed
Widgets
- A
Bannertitle wraps instead of being cut at one line, and the banner
grows taller with it.Banner::title_single_line(true)keeps the single
line. - In a right-to-left layout a label's lines sit against its right edge
when the label is wider than they are; they were flush left.
Rendering
- Text is as dark as in other applications. Glyph edges were blended in
linear light, which drew dark text on a light page about a quarter lighter
than a browser draws it, and light text on a dark page heavier. They are now
blended as Chromium blends them.TeksiloAppBuilder::text_contrastadjusts
it for every window, with aTextContrastor aSignalof one that a
preference can change while the application runs;TextContrast::OFF
restores the previous rendering. - Letters are evenly spaced. Each glyph was drawn at the nearest whole
pixel, so the gap between two letters could be off by a pixel and words ran
together at text sizes. Glyphs are now drawn at their position to a quarter
of a pixel, as browsers draw them (text-typeset 3.3.0).
Fixed
Core
- Dropping an
ObserverHandle, or replacing aSignal's value, no longer
panics withBorrowMutErrorwhen the removed callback or the old value
held the last reference to something that observes the same signal. The
same holds for the observers ofListModel,TreeModel,ChartModeland
the sort and chart projections. - A click on a part of an overlay that takes no focus no longer moves
focus to the widget the overlay is attached to, which closed an overlay
that dismisses when focus leaves it. EventContext::dismiss_modalcalled from outside any modal (an async
completion, arun_after_mountaction) closes the window's topmost in-tree
modal. It closed nothing, silently.
App and platform
build_headlessgives the window tree and the application tree the
builder'sevent_source, so widgets that callsubscribe_eventbuild
headless. A headless app delivers no events: what is posted is discarded.- Native mode on KDE Plasma follows the desktop portal's light or dark
choice when it states one. Where thekdeglobalscolours disagree with
it, stock Breeze of the portal's preference is used, with the user's accent,
fonts and animation speed. - A debug build with the automation bridge removes its endpoint descriptor
(and, on Unix, its socket) when the application quits, instead of leaving
one behind after every run. - The
system-emojifeature finds Fedora's colour emoji font, and the
older Fedora and openSUSE paths.
Widgets
- A click selects an item of a searchable
ComboBox's list, and so a font
in aFontPicker. The list closed on the press and nothing was selected;
only the keyboard and a touch tap worked. - A
MenuBarfollows a live locale change or a reload of the
translations: its titles, their accessible names and mnemonics (Alt+letter
included), and its menus' rows, inline or collapsed to a hamburger. A menu
open at the switch closes. - A long run with no break opportunity stays inside its label. A line of
asterisks or dashes wider than a monospacedTextWidgetwas cut one glyph
late, so the label was laid out and drawn wider than its box, and a
ScrollAreaaround it grew a horizontal scroll bar (text-typeset 3.2.1). - A key in the same frame as typed characters acts after them. In
TextInputField(andTextInput,PasswordField,SearchField),
CodeEditorandRichTextEditor, a key, an edit command or an assistive
technology's action that arrived in the frame the characters were typed in
ran before they were inserted: Enter could submit a truncated value (a
password manager's auto-type, a bar-code reader), Backspace removed the
wrong character.on_submit, the validator,on_commitandon_blurnow
find the bound signal holding everything typed before them, and
max_lengthcounts the characters of the current frame. - Text callbacks can use their editor.
RichTextEditor's
on_text_insertedandon_change,TextInputField::on_text_insertedand
CodeEditor::on_changecan read and edit the editor through its handle, for
example to replace an emoticon as it is typed. They panicked with "already
mutably borrowed".
Full Changelog: v0.27.0...v0.28.0