Skip to content

Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.

style: run cargo fmt to fix CI

Samir Hossainsb794db03c843
diff --git a/src/tui/screens/help.rs b/src/tui/screens/help.rs
index c5da72a..9e7dd5f 100644
--- a/src/tui/screens/help.rs
+++ b/src/tui/screens/help.rs
@@ -199,7 +199,7 @@ pub fn draw(frame: &mut Frame, area: Rect, state: &AppState, theme: &Theme) {
let content_width = help_text.iter().map(Line::width).max().unwrap_or(42) as u16;
let total_lines = help_text.len() as u16;
let available_height = area.height.saturating_sub(4);
-
+
let two_columns = total_lines > available_height;
let desired_width = if two_columns {
@@ -207,20 +207,14 @@ pub fn draw(frame: &mut Frame, area: Rect, state: &AppState, theme: &Theme) {
} else {
content_width.saturating_add(4)
};
-
+
let desired_height = if two_columns {
(total_lines + 1) / 2 + 2
} else {
total_lines + 2
};
- let popup_chunk = crate::tui::overlay::centered(
- area,
- desired_width,
- desired_height,
- 46,
- 120,
- );
+ let popup_chunk = crate::tui::overlay::centered(area, desired_width, desired_height, 46, 120);
crate::tui::overlay::clear_modal_area(frame, area, popup_chunk, theme);
@@ -239,16 +233,17 @@ pub fn draw(frame: &mut Frame, area: Rect, state: &AppState, theme: &Theme) {
if two_columns {
let inner = block.inner(popup_chunk);
frame.render_widget(block, popup_chunk);
-
+
let chunks = ratatui::layout::Layout::horizontal([
ratatui::layout::Constraint::Percentage(50),
ratatui::layout::Constraint::Percentage(50),
- ]).split(inner);
-
+ ])
+ .split(inner);
+
let mid = (help_text.len() + 1) / 2;
let left = help_text[..mid].to_vec();
let right = help_text[mid..].to_vec();
-
+
frame.render_widget(Paragraph::new(left).alignment(Alignment::Left), chunks[0]);
frame.render_widget(Paragraph::new(right).alignment(Alignment::Left), chunks[1]);
} else {