1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 14:49:06 -04:00
This commit is contained in:
lucasmerlin
2026-06-02 17:50:40 +02:00
parent 4b790584d8
commit 5e8bd371bc
2 changed files with 4 additions and 12 deletions

View File

@@ -297,10 +297,8 @@ impl<'a> AtomLayout<'a> {
if let Some((index, item)) = shrink_item {
// The `shrink` item gets the remaining space
let available_size_for_shrink_item = Vec2::new(
available_inner_size.x - inner_width,
available_inner_size.y,
);
let available_size_for_shrink_item =
Vec2::new(available_inner_size.x - inner_width, available_inner_size.y);
let sized = item.into_sized(
ui,
@@ -384,7 +382,6 @@ pub struct SizedAtomLayout<'a> {
/// Set the fallback (default) text color.
pub fallback_text_color: Color32,
/// The intrinsic (un-wrapped, un-grown) size, including margin. Used for
/// [`Response::set_intrinsic_size`].
pub(crate) intrinsic_size: Vec2,

View File

@@ -6,14 +6,9 @@ use std::sync::Arc;
/// A sized [`crate::AtomKind`].
#[derive(Clone, Debug)]
pub enum SizedAtomKind<'a> {
Empty {
size: Option<Vec2>,
},
Empty { size: Option<Vec2> },
Text(Arc<Galley>),
Image {
image: Image<'a>,
size: Vec2,
},
Image { image: Image<'a>, size: Vec2 },
Layout(Box<SizedAtomLayout<'a>>),
}