Skip to content

0.9.0

Choose a tag to compare

@rafaga rafaga released this 21 Sep 19:51
· 90 commits to master since this release

[0.9.0] - 2026-09-20

Breaking release: ThemeColors gains a required field, Style loses one field
and gains another mandatory one, and MapSettings drops its two-slot style vector.

Added

  • ThemeColors::marker, a new color role for a lasting "this is marked"
    indicator: a node's persistent state (halo/blink/orbit, started
    through Map::node) and a plain marker set with Map::update_marker.
    Deliberately distinct from selected (which node the pointer is nearest,
    right now) and alert (a one-off event playing out). All 15 built-in
    themes define it.
  • ThemeColors::background, so the map canvas's background now resolves
    from the active MapTheme for the current ColorMode, exactly like every
    other role, instead of always following the host application's own
    egui::Visuals.
  • New built-in theme Theme::SystemDefault (renamed from the working name
    EguiDefault), now the enum's #[default] variant, first in the list.
    Its colors are sourced directly from egui::Visuals::dark()/light()
    (hyperlink_color, noninteractive.bg_stroke, warn_fg_color,
    error_fg_color, strong_text_color()), with selected boosted in Dark
    mode to stay at least as saturated as marker.
  • RegionLabel and the LabelTemplate trait: a new kind of label anchored
    to an area of the map rather than to a single node. Unlike node names and
    MapLabels, a region label's font size scales with zoom instead of
    staying screen-constant, and it is always painted first (a background
    layer, behind everything else). Glyph layout is cached per
    (text, rounded size, font family), so a theme or alpha change never
    invalidates the cache. New API: Map::add_region_labels,
    Map::set_label_template, Style::region_label_font (a mandatory
    FontId — both family and size are read directly by the built-in
    renderer).
  • Viewport culling for region labels: a label whose projected center falls
    well outside the visible rect (plus a margin scaled to the current font
    size) is skipped before any layout or paint work happens, instead of
    being laid out and painted every frame regardless of visibility.
  • theme_gallery/<Theme>.svg: one self-contained SVG preview per theme
    (light and dark side by side), generated by a new standalone Rust tool,
    scripts/generate_theme_gallery, which replaces the previous Python
    script and the single combined theme_gallery.png. THEMES.md now
    embeds each theme's own SVG inline and lists a Background column
    alongside the other five color roles.

Changed

  • All 15 built-in themes were redesigned for visual cohesion across the
    catalog: node/text/background (and, for the 14 non-default themes,
    alert/selected/segment too) were reworked, and every theme now
    defines its own marker (same hue as alert, half its saturation) and
    background.
  • Flat markers (Map::update_marker) now resolve to ThemeColors::marker
    instead of ThemeColors::alert — a visible change for anyone using flat
    markers without installing a custom MapTheme.
  • Node background chips (NodeContext::background_color) now use
    extreme_bg_color from the host egui::Visuals instead of
    faint_bg_color, for better contrast against the map canvas.
  • Per-node theme and background-color lookups are now resolved once per
    paint batch instead of once per role per node, cutting redundant calls
    to Theme::colors() and egui::Context::theme() in busy scenes.
  • MapSettings.styles: Vec<Style> collapsed to a single
    MapSettings.style: Style (breaking) — the two light/dark slots held
    identical data once background_color moved out of Style (see
    Removed). Map's internal current_index: usize became dark_mode: bool, and the now-trivial Map::current_style() helper was removed.

Fixed

  • ArticCyan and SolarAmber had their entire Light/Dark color blocks
    transposed, making text illegible against light backgrounds. Added a
    permanent WCAG AA (4.5:1) contrast regression test covering all 30
    (theme, mode) combinations.
  • The THEMES.md/SVG generator's theme.rs parser normalizes \r\n line
    endings before matching, fixing a bug where a stray #[default] token
    leaked into a theme's tagline on CRLF (Windows) checkouts.
  • Stale documentation referencing colors and fields removed in earlier
    releases (a Style::alert_color that hasn't existed since 0.6.0, a
    NodeStyle::fill_color from a much older version of the crate) rewritten
    to describe current behavior.

Removed

  • Style::background_color (breaking) — the canvas background is now
    ThemeColors::background on the active MapTheme; nothing ever actually
    painted a background from this field (the canvas never had one of its
    own), so removing it drops dead state rather than changing rendering.
  • MapSettings::region_label_size (breaking) — superseded by the now
    mandatory Style::region_label_font.size.

Full Changelog: 0.5.1...0.9.0