mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
Fmt
This commit is contained in:
@@ -297,10 +297,8 @@ impl<'a> AtomLayout<'a> {
|
|||||||
|
|
||||||
if let Some((index, item)) = shrink_item {
|
if let Some((index, item)) = shrink_item {
|
||||||
// The `shrink` item gets the remaining space
|
// The `shrink` item gets the remaining space
|
||||||
let available_size_for_shrink_item = Vec2::new(
|
let available_size_for_shrink_item =
|
||||||
available_inner_size.x - inner_width,
|
Vec2::new(available_inner_size.x - inner_width, available_inner_size.y);
|
||||||
available_inner_size.y,
|
|
||||||
);
|
|
||||||
|
|
||||||
let sized = item.into_sized(
|
let sized = item.into_sized(
|
||||||
ui,
|
ui,
|
||||||
@@ -384,7 +382,6 @@ pub struct SizedAtomLayout<'a> {
|
|||||||
/// Set the fallback (default) text color.
|
/// Set the fallback (default) text color.
|
||||||
pub fallback_text_color: Color32,
|
pub fallback_text_color: Color32,
|
||||||
|
|
||||||
|
|
||||||
/// The intrinsic (un-wrapped, un-grown) size, including margin. Used for
|
/// The intrinsic (un-wrapped, un-grown) size, including margin. Used for
|
||||||
/// [`Response::set_intrinsic_size`].
|
/// [`Response::set_intrinsic_size`].
|
||||||
pub(crate) intrinsic_size: Vec2,
|
pub(crate) intrinsic_size: Vec2,
|
||||||
|
|||||||
@@ -6,14 +6,9 @@ use std::sync::Arc;
|
|||||||
/// A sized [`crate::AtomKind`].
|
/// A sized [`crate::AtomKind`].
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum SizedAtomKind<'a> {
|
pub enum SizedAtomKind<'a> {
|
||||||
Empty {
|
Empty { size: Option<Vec2> },
|
||||||
size: Option<Vec2>,
|
|
||||||
},
|
|
||||||
Text(Arc<Galley>),
|
Text(Arc<Galley>),
|
||||||
Image {
|
Image { image: Image<'a>, size: Vec2 },
|
||||||
image: Image<'a>,
|
|
||||||
size: Vec2,
|
|
||||||
},
|
|
||||||
Layout(Box<SizedAtomLayout<'a>>),
|
Layout(Box<SizedAtomLayout<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user