Fix keyboard navigation and panel scrolling issues

- Remove Network panel from navigation cycle
- Fix system panel scrolling to work in both directions
- Add complete scroll support to Services and Backup panels
- Update panel cycling to System → Services → Backup only
- Enhance scroll indicators with proper bounds checking
- Clean up unused Network panel code and references

Resolves issues with non-functional up/down scrolling and
mystery network panel appearing during navigation.
This commit is contained in:
2025-10-23 21:01:11 +02:00
parent 1b46aa2f13
commit 6b18cdf562
4 changed files with 106 additions and 48 deletions

View File

@@ -520,9 +520,13 @@ impl SystemWidget {
let total_lines = lines.len();
let available_height = area.height as usize;
if total_lines > available_height {
// Content is larger than area, apply scrolling
let max_scroll = total_lines.saturating_sub(available_height);
// Always apply scrolling if scroll_offset > 0, even if content fits
if scroll_offset > 0 || total_lines > available_height {
let max_scroll = if total_lines > available_height {
total_lines - available_height
} else {
total_lines.saturating_sub(1)
};
let effective_scroll = scroll_offset.min(max_scroll);
// Take only the visible portion after scrolling
@@ -535,7 +539,7 @@ impl SystemWidget {
let paragraph = Paragraph::new(Text::from(visible_lines));
frame.render_widget(paragraph, area);
} else {
// All content fits, render normally
// All content fits and no scroll offset, render normally
let paragraph = Paragraph::new(Text::from(lines));
frame.render_widget(paragraph, area);
}