@@ -93,8 +93,7 @@ impl App { |
| 93 | 93 | |
| 94 | 94 | // Create components |
| 95 | 95 | let header = HeaderBar::new(Rect::new(0, 0, width, HEADER_HEIGHT)); |
| 96 | | - let tab_bar_y = HEADER_HEIGHT + 4; // Small gap below header |
| 97 | | - let tab_bar = TabBar::new(Rect::new(0, tab_bar_y as i32, width, TAB_BAR_HEIGHT)); |
| 96 | + let tab_bar = TabBar::new(Rect::new(0, HEADER_HEIGHT as i32, width, TAB_BAR_HEIGHT)); |
| 98 | 97 | let process_list = Self::create_process_list(width, height); |
| 99 | 98 | |
| 100 | 99 | // Check if daemon is available |
@@ -124,9 +123,8 @@ impl App { |
| 124 | 123 | |
| 125 | 124 | /// Create process list with correct bounds. |
| 126 | 125 | fn create_process_list(width: u32, height: u32) -> ProcessList { |
| 127 | | - // Account for: header + gap + tab bar + section gap + graph label + graph + section gap |
| 128 | | - let tab_bar_y = HEADER_HEIGHT + 4; |
| 129 | | - let content_start = tab_bar_y + TAB_BAR_HEIGHT + SECTION_GAP + 20 + GRAPH_HEIGHT + SECTION_GAP; |
| 126 | + // Account for: header + tab bar + section gap + graph label + graph + section gap |
| 127 | + let content_start = HEADER_HEIGHT + TAB_BAR_HEIGHT + SECTION_GAP + 20 + GRAPH_HEIGHT + SECTION_GAP; |
| 130 | 128 | let list_height = height.saturating_sub(content_start); |
| 131 | 129 | let list_width = width.saturating_sub(CONTENT_PADDING * 2); |
| 132 | 130 | ProcessList::new(Rect::new(CONTENT_PADDING as i32, content_start as i32, list_width, list_height)) |
@@ -445,8 +443,7 @@ impl App { |
| 445 | 443 | |
| 446 | 444 | // Update component bounds |
| 447 | 445 | self.header = HeaderBar::new(Rect::new(0, 0, width, HEADER_HEIGHT)); |
| 448 | | - let tab_bar_y = HEADER_HEIGHT + 4; |
| 449 | | - self.tab_bar.set_bounds(Rect::new(0, tab_bar_y as i32, width, TAB_BAR_HEIGHT)); |
| 446 | + self.tab_bar.set_bounds(Rect::new(0, HEADER_HEIGHT as i32, width, TAB_BAR_HEIGHT)); |
| 450 | 447 | self.process_list = Self::create_process_list(width, height); |
| 451 | 448 | self.process_list.set_processes(self.processes.clone()); |
| 452 | 449 | |