From 858c36974bad616e9e6c1897882b8c9a97396bec Mon Sep 17 00:00:00 2001 From: kangal-bot Date: Wed, 27 May 2026 15:09:31 +0300 Subject: feat: configure mobile width threshold (#317) --- src/ui/mobile.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ui') diff --git a/src/ui/mobile.rs b/src/ui/mobile.rs index 2de79d23..c1dd57b6 100644 --- a/src/ui/mobile.rs +++ b/src/ui/mobile.rs @@ -14,7 +14,6 @@ use crate::detect::AgentState; use crate::layout::PaneId; use crate::terminal::TerminalRuntimeRegistry; -pub(crate) const MOBILE_WIDTH_THRESHOLD: u16 = 64; const SWITCH_BUTTON_WIDTH: u16 = 10; #[derive(Debug, Clone, Copy, Default)] @@ -42,8 +41,8 @@ pub(crate) enum MobileSwitcherTarget { Menu(usize), } -pub(crate) fn is_mobile_width(area: Rect) -> bool { - area.width > 0 && area.width <= MOBILE_WIDTH_THRESHOLD +pub(crate) fn is_mobile_width(area: Rect, threshold: u16) -> bool { + area.width > 0 && area.width <= threshold } pub(crate) fn compute_mobile_header_hit_areas(_app: &AppState, area: Rect) -> MobileHeaderHitAreas { -- cgit v1.2.3