mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 02:09:00 +00:00
Memoized views: rustfmt
This commit is contained in:
@@ -564,8 +564,7 @@ fn moved(ctx: &Context, settled: &Settled, view: Option<(Option<View>, Option<Vi
|
||||
fn engaged(ctx: &Context, layer: Layer, rect: Rect) -> bool {
|
||||
let screen = ctx.layer_transform_to_global(layer).map_or(rect, |transform| transform * rect);
|
||||
ctx.rect_contains_pointer(layer, rect)
|
||||
|| input_state::held_press_origin(ctx)
|
||||
.is_some_and(|origin| screen.contains(origin) && ctx.layer_id_at(origin) == Some(layer))
|
||||
|| input_state::held_press_origin(ctx).is_some_and(|origin| screen.contains(origin) && ctx.layer_id_at(origin) == Some(layer))
|
||||
}
|
||||
|
||||
/// Adds the last real run of the memoized view `id` to the running pass, in place of running it, at the place `shift`
|
||||
|
||||
@@ -7,12 +7,12 @@ use craft_ui::choice::Checkbox;
|
||||
use craft_ui::contract::{Bind, MemoProps, MemoView, Props as _, Show as _, ShowContainer as _, Tracked};
|
||||
use craft_ui::display::Text;
|
||||
use craft_ui::layout_components::{Row, Stack};
|
||||
use craft_ui::popover::Popover;
|
||||
use craft_ui::runtime::env::{BodyMode, RevealEdge, ShellCx, WindowKey};
|
||||
use craft_ui::runtime::memory::{SaveKey, set_saved_value};
|
||||
use craft_ui::runtime::{frame, inspect};
|
||||
use craft_ui::testing::in_audit_run;
|
||||
use craft_ui::testing::input::key_press;
|
||||
use craft_ui::popover::Popover;
|
||||
use craft_ui::testing::layout::{allocate, in_region, measured_block};
|
||||
use craft_ui::testing::pointer::{moved, press, release};
|
||||
use craft_ui::testing::{
|
||||
|
||||
Reference in New Issue
Block a user