diff --git a/crates/ui-contract/src/primitives/mod.rs b/crates/ui-contract/src/primitives/mod.rs index 3df36f813..9e820fbbe 100644 --- a/crates/ui-contract/src/primitives/mod.rs +++ b/crates/ui-contract/src/primitives/mod.rs @@ -60,7 +60,7 @@ pub use state_layer::{StateLayer, StateLayerKind}; pub(crate) use surface::{Frames as SurfaceFrames, SurfaceSlot, fit_to_frame}; pub use surface::{Surface, frame_surfaces}; pub use surround::paint_surround; -#[cfg(feature = "testing")] +#[cfg(feature = "suite")] pub(crate) use svg_set::Layer; pub use svg_set::{AppIcons, register_app_icons}; pub use text::{ChordText, HAlign, LayoutRun, LeastLayout, ReadingMeasure, Span, TextLayout, TextRun, Wrap}; diff --git a/crates/ui-contract/src/runtime/pointer.rs b/crates/ui-contract/src/runtime/pointer.rs index c9690393c..4a86d5471 100644 --- a/crates/ui-contract/src/runtime/pointer.rs +++ b/crates/ui-contract/src/runtime/pointer.rs @@ -254,7 +254,7 @@ pub(crate) struct Shapes { #[cfg(feature = "testing")] resolutions: u32, /// The `made_by_component` lookups the running pass made, for the count trials. - #[cfg(feature = "testing")] + #[cfg(feature = "suite")] made_lookups: u32, } @@ -388,6 +388,9 @@ pub(crate) fn begin(ctx: &Context, hit: HitSizes, latched: craft_keymap::Mods) { #[cfg(feature = "testing")] { shapes.resolutions = 0; + } + #[cfg(feature = "suite")] + { shapes.made_lookups = 0; } }); @@ -858,7 +861,7 @@ pub(crate) fn registered_widgets(ctx: &Context) -> std::collections::HashSet /// editor part, in the running pass of `viewport`. pub(crate) fn made_by_component(ctx: &Context, viewport: ViewportId, id: Id) -> bool { PerViewport::::with(ctx, viewport, |record| { - #[cfg(feature = "testing")] + #[cfg(feature = "suite")] { record.made_lookups += 1; } @@ -867,7 +870,7 @@ pub(crate) fn made_by_component(ctx: &Context, viewport: ViewportId, id: Id) -> } /// How many `made_by_component` lookups the running pass of `viewport` made so far, for the count trials. -#[cfg(feature = "testing")] +#[cfg(feature = "suite")] pub(crate) fn made_lookups(ctx: &Context, viewport: ViewportId) -> u32 { PerViewport::::with(ctx, viewport, |record| record.made_lookups) }