From bae0f65d81b111ad5bfe60ab1564c53087c03c7a Mon Sep 17 00:00:00 2001 From: Lucas Meurer Date: Mon, 31 Aug 2026 10:54:33 +0200 Subject: [PATCH] Rename --- crates/egui/src/atomics/atom_layout.rs | 7 ++----- crates/egui/src/widget_style/mod.rs | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/egui/src/atomics/atom_layout.rs b/crates/egui/src/atomics/atom_layout.rs index c1b4d54b6..b9bc25e8a 100644 --- a/crates/egui/src/atomics/atom_layout.rs +++ b/crates/egui/src/atomics/atom_layout.rs @@ -107,12 +107,9 @@ impl<'a> AtomLayout<'a> { self } - /// Set the gap between atoms, unless the caller already set one. - /// - /// Used to apply a [`crate::widget_style::AtomLayoutStyle`] without overriding a per-widget - /// [`Self::gap`]. + /// Set the gap between atoms, unless one was already set. #[inline] - pub(crate) fn gap_if_unset(mut self, gap: f32) -> Self { + pub(crate) fn fallback_gap(mut self, gap: f32) -> Self { self.gap = self.gap.or(Some(gap)); self } diff --git a/crates/egui/src/widget_style/mod.rs b/crates/egui/src/widget_style/mod.rs index 7c23e37fe..81bae4c6b 100644 --- a/crates/egui/src/widget_style/mod.rs +++ b/crates/egui/src/widget_style/mod.rs @@ -106,7 +106,7 @@ impl AtomLayoutStyle { let layout = layout .min_size(self.min_size) - .gap_if_unset(self.gap) + .fallback_gap(self.gap) .frame(self.frame) .fallback_font(self.text_style.font_id.clone()) .fallback_text_color(self.text_style.color);