mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Rename
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -91,7 +91,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);
|
||||
|
||||
Reference in New Issue
Block a user