From f7b0ee2f758440db3a3ff4cc727f879b420255d7 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Tue, 5 May 2026 18:32:14 +0300 Subject: feat: add mobile terminal layout --- src/app/input/sidebar.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/app/input/sidebar.rs') diff --git a/src/app/input/sidebar.rs b/src/app/input/sidebar.rs index f3ae2b06..fe8f14c1 100644 --- a/src/app/input/sidebar.rs +++ b/src/app/input/sidebar.rs @@ -1,6 +1,6 @@ use ratatui::layout::Rect; -use crate::app::state::{AppState, Mode}; +use crate::app::state::{AppState, Mode, ViewLayout}; use super::ScrollbarClickTarget; @@ -170,6 +170,10 @@ impl AppState { } pub(crate) fn global_launcher_rect(&self) -> Rect { + if self.view.layout == ViewLayout::Mobile { + return self.view.mobile_menu_hit_area; + } + let footer = self.sidebar_footer_rect(); let width = if self.update_available.is_some() { 8 @@ -983,7 +987,7 @@ mod tests { app.state.workspaces = vec![ws]; app.state.active = Some(0); app.state.selected = 0; - crate::ui::compute_view(&mut app.state, Rect::new(0, 0, 52, 20)); + crate::ui::compute_view(&mut app.state, Rect::new(0, 0, 65, 20)); let right = app.state.view.tab_scroll_right_hit_area; assert!(right.width > 0); @@ -1019,7 +1023,7 @@ mod tests { app.state.selected = 0; app.state.tab_scroll = usize::MAX; app.state.tab_scroll_follow_active = false; - crate::ui::compute_view(&mut app.state, Rect::new(0, 0, 52, 20)); + crate::ui::compute_view(&mut app.state, Rect::new(0, 0, 65, 20)); let last_idx = app.state.workspaces[0].tabs.len() - 1; let target = app.state.view.tab_hit_areas[last_idx]; -- cgit v1.2.3