pub fn touch_ui_active() -> boolExpand description
The signal the UI sizing policy consults to decide whether
interactive targets must meet the touch minimum (see
crate::widgets::menu::effective_metrics).
True when EITHER:
- the platform declared a mobile-touch profile (
is_mobile_touch) — the app calledset_input_profilewith a mobile variant, so we know up front the user is on a phone/tablet; OR - a real touch event has fired this session
(
crate::touch_state::touch_seen_this_session) — a runtime fallback for shells that forgot to callset_input_profile/crate::ux_scale::set_ux_scale(which has happened in real apps). Without it, such a phone would ship desktop-sized (26 CSS-px) menus; with it, the first touch flips the latch and the menus can never stay accidentally tiny.
Deliberately distinct from is_mobile_touch: that one drives the
on-screen keyboard and other “no physical keyboard” features, which must
NOT turn on just because a touchscreen laptop was tapped once. Sizing
minimums are safe to raise on any touch input, so this signal is broader.