Skip to main content

max / makeover-immediate

0.11.0: the overlay becomes reachable 0.10.0 answered what overlaying means in immediate mode -- Palette::elevation and Palette::cast, a real egui shadow rather than an invented painter -- and nothing could ask it. The description had no Depth::Overlay until makeover-layout 0.14.0, so the answer sat beside a question that could not be posed. frame() now hands the cast shadow to the egui::Frame, keyed off the fill being Fill::Overlay rather than off the variant, so it stays right for whatever else the description later calls an overlay. Also takes CellPart, which this renderer carries and does not draw. No table is drawn here yet; having the vocabulary is what makes drawing one later possible without inventing a private name for what a cell holds. The makeover-layout pin goes to the exact patch, as the rest of the suite pins. A minor-only requirement is satisfied by a consumer lock holding an earlier patch, which then fails to compile against an API added in a later one.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-11 18:27 UTC
Signed with PGP, not checked
Commit: e134381c58cb0605efb259b92645c3d9ca09e6ca
Parent: 8e1a40c
2 files changed, +44 insertions, -2 deletions
M Cargo.toml +5 -2
@@ -1,6 +1,6 @@
1 1 [package]
2 2 name = "makeover-immediate"
3 - version = "0.10.0"
3 + version = "0.11.0"
4 4 edition = "2024"
5 5 description = "The immediate-mode renderer for makeover-layout. Immediate mode is the constraint that matters, not the library: no cascade, no retained tree, one stroke per widget. Backed by egui."
6 6 license = "MIT"
@@ -8,7 +8,10 @@
8 8
9 9 [dependencies]
10 10 egui = { version = "0.35", default-features = false }
11 - makeover-layout = "0.12"
11 + # Exact patch rather than the minor, as the rest of the suite pins: a
12 + # minor-only requirement is satisfied by a consumer lock holding an earlier
13 + # patch, which then fails to compile against an API added in a later one.
14 + makeover-layout = "0.14.0"
12 15
13 16 [lints.rust]
14 17 unused = "warn"
M src/lib.rs +39
@@ -34,6 +34,21 @@
34 34 //! every call site decides. [`makeover_layout::Depth::pressed`] is what keeps
35 35 //! the decision from being re-derived per widget.
36 36 //!
37 + //! # 0.11.0: the overlay becomes reachable
38 + //!
39 + //! 0.10.0 answered what overlaying means in immediate mode with
40 + //! [`Palette::cast`], and nothing could ask: the description had no
41 + //! `Depth::Overlay` until `makeover-layout` 0.14.0, so the answer sat beside a
42 + //! question that could not be posed. [`frame`] now hands the cast shadow to the
43 + //! `egui::Frame` for any depth whose fill is [`Fill::Overlay`], keyed off the
44 + //! fill rather than the variant.
45 + //!
46 + //! The same release brings `makeover_layout::CellPart`, which this renderer
47 + //! carries and does not draw. No table is drawn here yet, and the vocabulary is
48 + //! what makes drawing one possible without inventing a private name for what a
49 + //! cell holds -- which is the whole reason it lives in the description rather
50 + //! than in `quasi`.
51 + //!
37 52 //! # Forms
38 53 //!
39 54 //! 0.5.0 adds the field vocabulary on top of the depth vocabulary:
@@ -295,6 +310,15 @@
295 310 if let Some(fill) = depth.fill().and_then(|f| palette.fill(f)) {
296 311 f = f.fill(fill);
297 312 }
313 + // A surface that overlays the page is cast onto it. [`Palette::cast`] has
314 + // answered what that means here since 0.10.0 and nothing could reach it: a
315 + // description had no way to say Overlay until makeover-layout 0.14.0, so
316 + // the answer sat beside the question. Keyed off the fill rather than the
317 + // variant, so it stays right for whatever else the description calls an
318 + // overlay later.
319 + if depth.fill() == Some(Fill::Overlay) {
320 + f = f.shadow(palette.cast());
321 + }
298 322 let framed = f.show(ui, add_contents);
299 323 if let Some(bevel) = depth.bevel() {
300 324 paint_bevel(
@@ -705,6 +729,21 @@
705 729 assert_ne!(raised, well);
706 730 }
707 731
732 + #[test]
733 + fn an_overlay_is_cast_onto_the_page_and_takes_no_edge() {
734 + // makeover-layout 0.14.0 is what made this reachable. The answer was
735 + // already here at 0.10.0 and the question could not be asked.
736 + let p = palette(Color32::from_rgb(9, 9, 9));
737 + assert_eq!(
738 + Depth::Overlay.fill().and_then(|f| p.fill(f)),
739 + Some(p.overlay)
740 + );
741 + assert_eq!(Depth::Overlay.bevel(), None);
742 + // The shadow `frame` reaches for is the theme's tone rather than
743 + // egui's default, which is the whole reason `cast` exists.
744 + assert_eq!(p.cast().color, p.elevation);
745 + }
746 +
708 747 #[test]
709 748 fn the_lit_edge_swaps_when_a_card_is_pressed() {
710 749 let p = palette(Color32::from_rgb(9, 9, 9));