Skip to content

v0.28.0

Choose a tag to compare

@github-actions github-actions released this 19 Nov 21:11
· 40 commits to main since this release
19adcf3

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
    Signal lets 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) and GLYPH_RENDERING_KEY decide the
    text contrast and the glyph rendering, followed live: a control bound to
    ctx.settings().signal_for(&KEY) changes every window. TextContrast
    gains the STRONGER and STRONGEST presets, and both enums an all()
    listing their options for a picker.
  • Single instance (feature single-instance).
    teksilo::app::single_instance::acquire elects one running instance per
    user, and TeksiloAppBuilder::single_instance hands 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_ctx as an InstanceMessage. 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.
  • TerminationWatch keeps SIGTERM and SIGHUP from ending the process
    outside the event loop. Installed at the top of main and given to the
    builder with TeksiloAppBuilder::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) and ctx.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: and file: URIs are refused. An
    OpenUriHandle registered 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_theme is 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. TextAlign now lives in
    teksilo_canvas and the prelude; teksilo_scene::TextAlign is 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_width and
    StandardTreeItem::label_fills_width
    let the label column take the row's
    free width, so a label_slot and the subtitle row end at the row's end.

Settings and i18n

  • AppPaths::state_dir() and cache_dir() (with create_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::Weekday and DateFields::MonthDay for
    TeksiloDateTimeFormatter, rendered by ICU in the locale's own form
    ("Monday", "lundi", "August 31", "31 août").

Changed

Widgets

  • A Banner title 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_contrast adjusts
    it for every window, with a TextContrast or a Signal of 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 a Signal's value, no longer
    panics with BorrowMutError
    when the removed callback or the old value
    held the last reference to something that observes the same signal. The
    same holds for the observers of ListModel, TreeModel, ChartModel and
    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_modal called from outside any modal (an async
    completion, a run_after_mount action) closes the window's topmost in-tree
    modal. It closed nothing, silently.

App and platform

  • build_headless gives the window tree and the application tree the
    builder's event_source
    , so widgets that call subscribe_event build
    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 the kdeglobals colours 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-emoji feature 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 a FontPicker.
    The list closed on the press and nothing was selected;
    only the keyboard and a touch tap worked.
  • A MenuBar follows 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 monospaced TextWidget was cut one glyph
    late, so the label was laid out and drawn wider than its box, and a
    ScrollArea around 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 (and TextInput, PasswordField, SearchField),
    CodeEditor and RichTextEditor, 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_commit and on_blur now
    find the bound signal holding everything typed before them, and
    max_length counts the characters of the current frame.
  • Text callbacks can use their editor. RichTextEditor's
    on_text_inserted and on_change, TextInputField::on_text_inserted and
    CodeEditor::on_change can 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