aboutsummaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorkangal-bot <kangal@herdr.dev>2026-05-27 15:09:31 +0300
committerGitHub <noreply@github.com>2026-05-27 15:09:31 +0300
commit858c36974bad616e9e6c1897882b8c9a97396bec (patch)
tree63a6b332599596708dc7a66cead14af474755fd2 /src/ui
parent9a89e3dc181bdf35101c2066bea114394afb93e2 (diff)
feat: configure mobile width threshold (#317)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/mobile.rs5
1 files changed, 2 insertions, 3 deletions
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 {