Refactor ruin_app, add some README files, minor usability in reactivity
This commit is contained in:
@@ -257,6 +257,7 @@ pub fn layout_snapshot_with_cache(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn layout_element(
|
||||
element: &Element,
|
||||
rect: Rect,
|
||||
@@ -797,6 +798,7 @@ struct MeasuredChild {
|
||||
is_flex: bool,
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn layout_container_children(
|
||||
element: &Element,
|
||||
content: Rect,
|
||||
@@ -996,8 +998,13 @@ fn intrinsic_container_content_size(
|
||||
.height
|
||||
.map(|h| h + vertical_insets(child_insets))
|
||||
.unwrap_or(content_size.height);
|
||||
let child_size =
|
||||
intrinsic_size(child, UiSize::new(offered_w, offered_h), text_system, perf_stats, layout_cache);
|
||||
let child_size = intrinsic_size(
|
||||
child,
|
||||
UiSize::new(offered_w, offered_h),
|
||||
text_system,
|
||||
perf_stats,
|
||||
layout_cache,
|
||||
);
|
||||
// child_size is always outer; accumulate directly.
|
||||
width = width.max(child_size.width);
|
||||
if !skip_main {
|
||||
@@ -1030,8 +1037,13 @@ fn intrinsic_container_content_size(
|
||||
.height
|
||||
.map(|h| h + vertical_insets(child_insets))
|
||||
.unwrap_or(content_size.height);
|
||||
let child_size =
|
||||
intrinsic_size(child, UiSize::new(offered_w, offered_h), text_system, perf_stats, layout_cache);
|
||||
let child_size = intrinsic_size(
|
||||
child,
|
||||
UiSize::new(offered_w, offered_h),
|
||||
text_system,
|
||||
perf_stats,
|
||||
layout_cache,
|
||||
);
|
||||
// child_size.width is outer; use directly as the fixed main contribution.
|
||||
let child_main = child_size.width;
|
||||
fixed_main += child_main;
|
||||
|
||||
Reference in New Issue
Block a user