Repository navigation
fastframe 0.19.0 brings fastframe-ui, themed egui components that ZapFast, Spotifast, Solco and TonePush are moving onto, with three crates beside it for docked panels, diffs and code. It moves to egui 0.38, lets apps in the tray sleep instead of waking 400 times a minute, keeps busy indicators to a frame budget, and fixes names and messages in Tai Le, Limbu, Bengali and other scripts that drew as boxes or broken.
Move every fastframe crate to tag = "v0.19.0". What an app must do:
- Move to egui and eframe 0.38 (and egui_table 0.12 and egui_dock 0.23 if it uses them). An app that patches egui and winit moves both forks together: crmne/egui's
apps-0.38branch atf10a3930and crmne/winit'sapps-0.30branch at87de1de06e4561e7a77a1f05ab337fbaac4adbb9. The getting-started guide has the whole[patch.crates-io]section. - Drop
.idle(fastframe_tray::idle).Shell::idleandfastframe_tray::idleare removed: the shell's own sleep now serves AppKit's loop on macOS and the thread's window messages on Windows. Work a headless tick notices only by reading the clock now runs up to 30 s late (HEADLESS_SLEEP) instead of within 150 ms, so ask for a repaint at its deadline in the tick (ctx.request_repaint_after(left)) or wake the shell'sWakerfrom the thread that delivers it. - Match the new notification events.
Event::ActivatedisEvent::Activated { activation_token }andEvent::Action(id)isEvent::Action { id, activation_token }. - Add a wildcard arm (
_ => {}) to matches on the enums the crates hand back. They are#[non_exhaustive]now, so a later case is not a breaking change: notifications'ErrorandEvent, power's and tray'sEvent, now-playing'sCommand, audio'sOpenErrorandReason,FontError,IconError, update'sKind,PackageManagerandDownloadState, autostart'sState, dirs'Modeand instance'sClaim. - Pass the theme catalogue a closure.
catalog.start(dir, selected, move || waker.wake()), withoutfastframe_theme::Waker::new. - Use the one copy of two duplicated helpers.
fastframe_desktop::macos_notifications_allowed()is gone: usefastframe_notifications::Client::permission.fastframe_now_playing::desktop_entryis gone: callfastframe_desktop::desktop_entry. - Stop reading
fastframe_text::portal,fastframe_text::fontconfigandfastframe_fonts::system::Fallback::y_offset_factor. The readers are private, and egui 0.38 puts every fallback face on the primary face's baseline, so the offset is gone. - On the apps' winit fork with
macos-quit-as-close, setFASTFRAME_WINIT_QUIT_REPLY = "1"under[env]in.cargo/config.toml, so a declined quit answers its sender (see Fixed). Apps without that feature leave it unset; setting it there, or on stock winit, fails to build. - Check two new warnings in
-D warningsbuilds. The event drains (Power::events,Tray::events,Dock::events,NowPlaying::commands, audio'stake_errors), the getters beside them and the notification builders are#[must_use], andfastframe_audio::OutputErrorandoutput_device_namesare deprecated in favour ofStreamErrorandoutput_devices. - Pick Inter yourself if you want it.
FontSetupnow draws with the platform's interface face by default (see New);Primary::Interkeeps the bundled face.
Apps that built fastframe-ui from main before this release also follow Upgrading from a pre-release fastframe-ui below.
New
-
fastframe-ui: themed components for egui apps. Buttons, fields, pickers, menus, dialogs, lists, tables, trees, sidebars, settings pages, calendars, notifications, avatars, badges, chat bubbles and more. As in SwiftUI, a component says what it is and a style draws it, and how it looks is two choices made apart: a look (shape, spacing, type, motion, shadows) and a theme (colour). Four looks come with it: shadcn (the default), fastframe, Signal and Studio, a denser, darker one for pro tools. 21 themes are bundled, theme files load as JSON, and the components follow the system's light or dark appearance by themselves. Each component has a page on fastframe.dev that runs it in the browser.
-
The four apps are moving onto it. fastframe-ui grew from what ZapFast, Spotifast, Solco and TonePush each drew by hand, and their ports shaped it: the pill and bare icon buttons ZapFast and Spotifast shared, a table for Spotifast's playlists, Solco's library and TonePush's tone library (app-kept selection, scrolling to a row, rows loaded before a scroll reaches them, row drags carrying the app's payload, column widths the app decides, disabled rows, one Tab stop for the whole table), menus with headers, colour swatches and keycaps, and settings rows. In those ports:
- TonePush draws its library of 2,000 tones in 0.63 ms a frame instead of 7.4 to 9.4 ms, and starts with it in 0.30 s instead of 2.3 s.
- Solco shows its first page of rows in about 38 ms instead of about 280 ms, and at rest takes 6% CPU and about 295 wakeups a second instead of 10% and about 890.
-
A table for libraries of any size.
Tablelays out with egui_table and paints in the look's own way: a sticky header, fixed columns, sorting, column moving and hiding, row drags and drops, overlay scrollbars whose thumbs float over the rows, keyboard selection and screen-reader names for every row.Column::painteddraws a column's cells without aUieach, andButton::show_in_celldraws a button sized to its cell. -
fastframe-ui-dock, fastframe-ui-diff and fastframe-ui-editor. Dockable tabbed panels (drag a tab to move, split or float it) on egui_dock, a diff view (unified or side by side, word highlights, folded unchanged lines), and a code editor (line numbers, syntax colours, the current line, find), each drawn in the look.
-
Right-to-left labels read in order in every component on the apps' egui fork, with
FASTFRAME_EGUI_BIDI = "1"set; stock egui draws them as before. -
The platform's own interface face by default.
FontSetupnow draws with San Francisco on macOS, Segoe UI on Windows and fontconfig'ssystem-uion Linux, with Inter where none is found. Inter, when chosen, draws at its display optical size, whose tighter spacing reads better in an interface. -
Notification clicks hand the app GNOME's activation token (
activation_tokenonEvent::ActivatedandEvent::Action), so the app can create its window with it, which ends GNOME's busy spinner. Reported in crmne/zapfast#1072 by @alex3137. -
Middle-click autoscroll in fastframe-scroll. Middle-click a list and move the pointer away to scroll, as in browsers. Opt-in on Linux and FreeBSD, where middle click pastes the primary selection; off on macOS. By @Felitendo in #44.
-
The playback rate over MPRIS.
State::ratetells Linux desktops how fast playback runs, so their position bars no longer drift at other speeds. Asked for in #86 by @mdmrk. -
Dracula and Alucard presets in fastframe-theme. By @farheinheigt in #37.
-
A gallery of eight made-up test apps (mail, settings, music, tracker, code, chat, admin, notes) that combine the components as real applications do, in every look, light and dark, and a frame bench that measures what each one costs a frame.
Fixed
- Apps in the tray no longer wake 400 times a minute. A hidden app ran its headless tick every 150 ms. The shell now sleeps until the soonest repaint the tick asked for, at most 30 s, and a wake from any thread or a menu item chosen anywhere in the app ends the sleep at once. A hidden ZapFast now wakes 4 times a minute.
- Busy indicators no longer take a frame every 33 ms. Spinners, bars, shimmers, skeletons and typing dots step on a shared grid (10 frames a second for one that steps, 30 at most for one that moves smoothly) and hold still while the window is in the background. TonePush's busy indicator draws 10.5 frames a second instead of 60, about 7.3 ms of CPU a second instead of about 41, and ZapFast's typing indicator draws 600 frames a minute instead of 1,800.
- A logout or shutdown no longer stops at a Mac app that keeps running in the background. With
macos-quit-as-close, the sender of a quit Apple Event (the Dock's Quit, Activity Monitor, a logout) read "User canceled" at once, even when the app then quit. On the apps' winit fork the shell now answers with the app's real decision. - A click on a custom macOS app menu or Dock menu item is read at once while a window is open, rather than at the next repaint (2.0 s in a check on macOS 27; now 0.4 to 5.3 ms).
- Names in Tai Le, Limbu and other scripts no longer draw as boxes. Tibetan, Mongolian, Thaana, Syriac, Odia, Ol Chiki, Chakma, Meetei Mayek, New Tai Lue, N'Ko, Tifinagh, Vai, Adlam, Canadian syllabics, Osage and Lisu also find a face, Windows' own where it ships one. Reported in crmne/zapfast#1159 by @rigues.
- Bengali conjuncts join on Windows, and every script is shaped by the face chosen for it, not by an earlier face that also maps it. Windows' own interface faces now draw Armenian, Georgian, Hebrew and Hangul, rather than Comic Sans MS, Lucida Sans Unicode or Arial Unicode MS. Reported in crmne/zapfast#1264 by @wkazisan.
- COLR emoji fonts draw in colour on Linux (Fedora's Noto Color Emoji COLRv1, Fluent Emoji, Segoe UI Emoji) and as bundled fonts. Reported in #81 by @Striffly.
- The tray icon shows in bars that read the icon file, such as Omarchy's, even when the app's icon was installed after the bar started.
- Wayland touchpads scroll as far as in GTK 4 on the apps' egui fork, and fastframe-scroll no longer scales them a second time.
- A maximised window's top-right pixel is Close on Windows, as in native apps, and a restored window has no dead strip between its caption buttons and the resize border. By @Espaye in #61.
Known limitations
- Spotifast's playlist is still a little slower a frame than before fastframe-ui: about 7% at rest and 4% scrolling on the apps' egui fork (0.112 ms against 0.105 ms at rest; at the 95th percentile, scrolling is faster than before), and about 12% on stock egui 0.38, where egui still does accessibility bookkeeping with no screen reader listening (emilk/egui#9014). Its Home page is as fast as before, or faster.
- Solco's cleanup confirmation dialog takes a slower frame as it opens (p95 2.11 to 2.63 ms), and its memory settles a few MB higher.
- On stock egui 0.38, Wayland touchpads scroll slower than before. fastframe-scroll's own touchpad scale is 1 now that the egui fork's egui-winit scales like GTK 4 (emilk/egui#8985); without the fork,
FASTFRAME_TOUCHPAD_SCALEorScrolling::set_touchpad_scalesets one. - The playback rate reaches only MPRIS. souvlaki, which the Windows and macOS controls go through, cannot pass it on, so those assume normal speed.
- winit 0.30 cannot raise a window that is already open with an activation token, so a notification click raises only a window created with it.
- fastframe-ui's API may still change as the apps finish their ports; each change will be named in the notes.
Upgrading from a pre-release fastframe-ui
fastframe-ui is new in this release, but the four apps built it from main while it grew. An app that pinned an earlier commit makes these changes:
- The default look is fastframe. An app that never calls
set_lookdraws inLook::fastframe()(its shapes, styles and theme) instead of shadcn, andTokens::light(),Tokens::dark()andTokens::default()are the fastframe look's tokens. To keep the old appearance, callfastframe_ui::set_look(ctx, Look::shadcn()). The dock crate keeps its own default style: pairLook::fastframe().replace(dock_styles::Standard, dock_styles::Fastframe)as the gallery does. - Control sizes come from the look.
Size::height(),padding(),text_size()andicon_size()are gone: readtokens(ctx).shape.controls.heights[size]and the like.InputStyle::paddingtakes&ControlSizes. The per-size fields arePerSize<T>(PerSize::new(..),PerSize::all(..), indexed bySize), andControlSizes::heightand the other getters,TableMetrics::atandheader_heightare gone. - One interaction state.
ButtonState,ToggleState,PickerState,DisclosureState,TabItemStateandMenuItemStateare oneControlState;button.state.loadingisbutton.loading, a picker trigger'sstate.openistrigger.open, a menu item'sstate.highlightedandstate.openareitem.highlightedanditem.open.Control::show's closure takes(painter, rect, state).ButtonColorsis{ background, foreground, hover_background, hover_foreground }. theme(ctx)istokens(ctx), andTextStyle,TextStylesandshape.text_stylesareTypeStyle,TypeScaleandshape.type_scale.- One setter.
set_tokens,applyandset_look_keeping_visualsare gone:set_look(ctx, look)follows the appearance by itself, andlook.egui_visuals(true)styles egui too. ALookhas one shape:Look::new(name, shape),look.with_shape(|s| ..), andname(),theme()andshape()in place of the fields. - Depth.
Shape::shadowandShape::font_sizeare gone;Shape::elevationis anElevation(Elevation::uniform(..),Elevation::NONE) ofShadowShapes, and shadow colours are the theme'sColors::shadows.tokens.popover_shadow(..)anddialog_shadow(..)aretokens.shadows(). - Colours.
Colors::from_base_colors(name, dark, |name| ..)isColors::from_base(name, dark, &BaseColors { .. }), whoseoverlayandshadowfields arepopoverandscrim. Component colours are grouped:link,group_box,description_list_label,list,table,controls,tab,sidebar,bars,scrollbarandchart(colors.table.hoverforcolors.table_hover). - Theme files.
Theme::from_fileandColors::parse_fileareTheme::from_jsonandColors::from_json, returning aThemeError;presets::themes()returns&'static [Theme], andTheme::all()isTheme::built_in()chained with the presets. look.replace(button_styles::Standard, Pill)names the built-in style and takes the style itself, without a key orArc.- One name per builder concept.
accessible_labelandaccessible_nameareaccessibility_label;InputandNumberInput'sprefix,suffix,prefix_textandsuffix_textarestart,end,start_textandend_text;Image::sticky("cover")is.sticky(true).id_salt("cover");Tooltip::show_uiisshow_with_body. Flags that took no argument take abool:Toolbar::bordered,Breadcrumb::clickable,Notification::clickable,Combobox::cleanableandhighlight_matches,Picker::searchable,highlight_matchesandcleanable,verticalonCarousel,ButtonGroup,DescriptionList,StepperandSlider,Slider::reverseandColumn::text_center. - Notifications.
Notification::id_saltis gone: make aNotificationIdonce and pass it to.id(..)and toaction_clicked(..). - Tables.
Table::new(&mut state, &columns).show(ui, &mut delegate)takes the state innew.ListResponse::confirmedandTreeResponse::confirmedareactivated, andTableResponse::edit_cancellediscancelled.TableDelegate::row_overlaytakes one&TableRowOverlay, andprefetchtakes a&TablePrefetch(.visibleis the old range;.prefetch_rows(0)keeps it). ATableCellorTableRowsliteral or pattern adds the new fields (or..), andTableResponsecan no longer be built with a literal. - Return shapes.
Empty::showreturnsInnerResponse<R>,AttachmentGroup::showreturnsInnerResponse<R>, andMenuUi::submenureturns anInnerResponsewhose.inneris what it returned before. - Text. Labels, menu rows, tabs, columns and screen-reader names borrow (
impl Into<Cow<str>>), soLabel,Kbd,Column,Control,Clipboard,IconWidget,ResizeHandle,StatusBar,Toolbar,TooltipandLinkhave a lifetime (Column<'static>). Other shown text takesimpl Into<WidgetText>: a helper that passes its ownimpl Into<String>through adds.into(), a customPickerStyleorDatePickerStylereads its label, description or placeholder as&WidgetText, andListSectionis no longerPartialEq. - Smaller ones.
TITLE_BAR_HEIGHTis gone (readshape.metrics.title_bar.height) andLOAD_MORE_DISTANCEis private (load_more_withintakes another).MenuItem::paint_contenttakesMenuItemColors.button_styles::FramelessIconhas nosize: the button'sicon_sizesizes the icon.KeycapStyleliterals add..KeycapStyle::default().DiffDocument::oldisold_text, andFindLabelsborrows its words. Pill and bare icon buttons keep the arrow pointer: a style of the app's that wants the hand returns it fromButtonStyle::cursor.
Upstream
What this release needed from egui and winit, proposed upstream and carried in the apps' forks until a release includes it:
- emilk/egui#8969: a Wayland connection the compositor closed is an error, not a panic. Open.
- emilk/egui#8985: Wayland touchpads scroll as far as in GTK 4. Open.
- emilk/egui#8990: one glyph per character when a cluster shapes into more glyphs, so carets, clicks and selection stay on character edges. Open.
- emilk/egui#9014: no accessibility bookkeeping while no screen reader listens, so no context lock per widget for an empty node. Open.
- emilk/egui#9015: a scroll target lands on the frame it is asked, not one frame later. Open.
- emilk/egui#9008: always-hidden scroll bars no longer animate a hover fade. Open; fastframe-ui's
Scrollabledoes without it, so the fork doesn't carry it. - emilk/egui#8911: text at a new size no longer re-analyses an auto-hinted font, about 40% faster first layout. Merged after 0.38.0.
- rust-windowing/winit#4692: macOS Quit through close requests, which the fork extends to tell a Quit from a close click and keep a quit Apple Event's sender waiting for the app's answer. Open.
- rust-windowing/winit#4867: Wayland outputs and seats announced at runtime are bound after a round trip. Open.
- rust-windowing/winit#4868: Windows keeps a window's minimum size when the system moves it. Open.
Thanks
@Felitendo, @Espaye and @farheinheigt for their pull requests, and @alex3137, @rigues, @wkazisan, @Striffly and @mdmrk for their reports and requests.
Full changelog: all changes since 0.18.0.
