Feat: entretien de la codebase
This commit is contained in:
@@ -9,6 +9,7 @@ use crate::engine::LinkState;
|
||||
use crate::midi;
|
||||
use crate::state::OptionsFocus;
|
||||
use crate::theme;
|
||||
use crate::widgets::{render_scroll_indicators, IndicatorAlign};
|
||||
|
||||
pub fn render(frame: &mut Frame, app: &App, link: &LinkState, area: Rect) {
|
||||
let theme = theme::get();
|
||||
@@ -243,24 +244,15 @@ pub fn render(frame: &mut Frame, app: &App, link: &LinkState, area: Rect) {
|
||||
|
||||
frame.render_widget(Paragraph::new(visible_lines), padded);
|
||||
|
||||
let indicator_style = Style::new().fg(theme.ui.text_dim);
|
||||
let indicator_x = padded.x + padded.width.saturating_sub(1);
|
||||
|
||||
if scroll_offset > 0 {
|
||||
let up_indicator = Paragraph::new("▲").style(indicator_style);
|
||||
frame.render_widget(
|
||||
up_indicator,
|
||||
Rect::new(indicator_x, padded.y, 1, 1),
|
||||
);
|
||||
}
|
||||
|
||||
if visible_end < total_lines {
|
||||
let down_indicator = Paragraph::new("▼").style(indicator_style);
|
||||
frame.render_widget(
|
||||
down_indicator,
|
||||
Rect::new(indicator_x, padded.y + padded.height.saturating_sub(1), 1, 1),
|
||||
);
|
||||
}
|
||||
render_scroll_indicators(
|
||||
frame,
|
||||
padded,
|
||||
scroll_offset,
|
||||
visible_end - scroll_offset,
|
||||
total_lines,
|
||||
theme.ui.text_dim,
|
||||
IndicatorAlign::Right,
|
||||
);
|
||||
}
|
||||
|
||||
fn render_section_header(title: &str, theme: &theme::ThemeColors) -> Line<'static> {
|
||||
|
||||
Reference in New Issue
Block a user