Upgrade egui stack 0.29 → 0.35 - #23
Merged
Merged
Conversation
Mechanical migration only — no behavior or API-surface changes beyond
what the egui upgrade forced.
Dependency bumps:
- egui 0.29 -> 0.35
- egui_extras 0.29 -> 0.35
- eframe 0.29 -> 0.35 (dev-dependency)
- egui-phosphor 0.7 -> 0.13 (the release pinned to egui ^0.35)
API migrations:
- Rounding -> CornerRadius (now i8-backed); helper fns cast the f32
radius tokens `as u8`
- Frame::none() -> Frame::new() / Frame::NONE
- Margin::same/symmetric now take i8, not f32 — cast at call sites
- WidgetVisuals::rounding -> corner_radius; Visuals::window_rounding /
menu_rounding -> window_corner_radius / menu_corner_radius
- Painter::rect_stroke now requires an explicit StrokeKind; used
StrokeKind::Inside everywhere (egui team's stated migration default
for closed rectangles, matching this crate's prior stroke look)
- Context::style()/set_style() removed in favor of per-theme
style_of()/style_mut_of(); theme::apply() now pins the active
theme via ctx.set_theme() and fully rewrites that theme's Style in
one style_mut_of() closure, preserving the old single-Style
override behavior
- egui::Id::new / id_salt now require AsId (Hash + Debug) — all
`id_source: impl Hash` params gained a `+ std::fmt::Debug` bound
- ctx.fonts(|f| f.layout_job(..)) -> ctx.fonts_mut(..) (layout_job
needs a mutable FontsView)
- TextEdit::frame(bool) -> TextEdit::frame(Frame); false -> Frame::NONE
- egui::popup module / Memory::{is_popup_open,toggle_popup} removed —
ported menu_button/select to the new egui::Popup builder
(from_toggle_button_response + close_behavior); open-state reads use
Popup::is_id_open
- Context::screen_rect() removed -> content_rect()
- eframe::App::update -> App::ui (gallery example only)
Docs: AGENTS.md / README.md version claims updated to match.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adversarial review of PR #23 caught three real issues before merge: 1. StrokeKind::Inside was the wrong migration choice. Verified directly against the egui 0.29.1 epaint source (tessellator.rs:1709, `PathStroke::from(stroke).outside()` inside `tessellate_rect`) — 0.29's rect strokes were StrokeKind::Outside, not the migration guide's general "you probably want Inside" recommendation. Inside would have shifted every card/button/input border inward by a full stroke width. Flipped all 13 rect/rect_stroke sites in components.rs to Outside. 2. CI was failing on MSRV: egui 0.35 requires rustc 1.92 (confirmed via egui-0.35.0/Cargo.toml `rust-version = "1.92"`), but this repo had no rust-toolchain.toml and CI pinned rustc 1.88 via a literal dtolnay action version. Added rust-toolchain.toml (channel = "stable", mirrors tokito's), bumped Cargo.toml rust-version to 1.92, and repinned ci.yml's toolchain action to the 1.92.0 branch SHA. This also newly unlocks an MSRV-gated clippy suggestion (`map_or(true, ..)` -> `is_none_or(..)`) — fixed the one call site clippy flagged. 3. Fixed the gallery dev-dependency's `eframe` to build on glow instead of 0.35's new wgpu default, matching the consuming app. `winit/default` (Wayland CSD + dlopen) isn't reachable through eframe's feature table from a downstream Cargo.toml (`dep/feature` syntax only reaches a *direct* dependency) — added `winit` as a direct dev-dependency at the same version eframe pins, requesting only the two sub-features (`wayland-csd-adwaita`, `wayland-dlopen`) that eframe's default-off build otherwise drops, restored via Cargo's per-package feature unification. Also fixed a broken intra-doc link (`egui::SidePanel::right` -> `egui::Panel::right`) that `cargo doc -D warnings` caught. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mechanical upgrade of
tokito_ui's egui stack from 0.29 to 0.35 — no behavior or visual changes intended. This is the upstream half of TokitoAI/tokito#502 (M0: egui 0.29 → 0.35): the app consumes this crate as a git-tagged dependency, so its egui types must unify with the app's before the app-side bump can compile.Dependency changes
egui0.29 → 0.35egui_extras0.29 → 0.35egui-phosphor0.7 → 0.13 (the release whoseeguidependency is^0.35)eframe(dev-dependency, gallery example) 0.29 → 0.35API migrations
Rounding→CornerRadius(nowi8-backed) —rounding_xs/sm/md()helpers onTokensnow cast the underlyingf32radius fields withas u8.Frame::none()→Frame::new();Margin::same/symmetricnow takei8.WidgetVisuals::rounding→corner_radius;Visuals::window_rounding/menu_rounding→window_corner_radius/menu_corner_radius.Painter::rect_strokenow requires an explicitStrokeKind— usedStrokeKind::Insideeverywhere (egui's own migration guide's stated default for closed rectangles).Context::style()/set_style()removed for per-themestyle_of/style_mut_of.theme::apply()now pins the active theme viactx.set_theme(...)and rewrites that theme'sStylein onestyle_mut_ofclosure — preserves the prior "single active style, unconditionally overwritten" behavior.egui::Id::newnow requiresAsId(Hash + Debug) — everyid_source: impl Hashparameter acrosscomponents.rsgained a+ std::fmt::Debugbound.ctx.fonts(|f| f.layout_job(..))→fonts_mut(..)(layout_jobneeds&mut FontsView).TextEdit::frame(bool)→frame(Frame);false→Frame::NONE.egui::popupmodule andMemory::{is_popup_open,toggle_popup}were removed as part of egui 0.32's popup/menu overhaul —menu_buttonandselectported to the newegui::Popupbuilder (Popup::from_toggle_button_response(...).id(...).close_behavior(...).show(...); open-state reads usePopup::is_id_open).Context::screen_rect()→content_rect()(themodalprimitive).eframe::App::update→App::ui(gallery example only).Docs
AGENTS.mdandREADME.mdversion claims updated (egui 0.29 → 0.35, egui-phosphor 0.7.x → 0.13.x,id_sourcebound note).Gates (all green locally)
cargo fmt --all -- --checkcargo clippy --all-targets -- -D warningscargo test --all-targets(no unit tests exist in this crate yet; example compiles and runs)For the reviewer
StrokeKind::Insideis a judgment call, not derivable from the type system — worth a visual pass overcargo run --example galleryin both themes to confirm borders still read the same.+ std::fmt::Debugbound onid_sourceparams (existing callers all passDebugtypes already, so this should not breaktokito).🤖 Generated with Claude Code