1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00
This commit is contained in:
Lucas Meurer
2026-08-31 10:54:33 +02:00
parent c9af1d12e3
commit 42c8886277
2 changed files with 3 additions and 6 deletions

View File

@@ -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
}

View File

@@ -115,7 +115,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);