Add vertical scroll to Notes field in EditTask popup
- Added notes_scroll to App and AppView - Up/Down in Notes field scrolls (Tab cycles fields instead) - Reset scroll on opening EditTask popup - Notes Paragraph uses .scroll((notes_scroll, 0))
This commit is contained in:
@@ -326,6 +326,7 @@ pub fn render_edit_task_popup(
|
||||
title_cursor: usize,
|
||||
notes: &str,
|
||||
notes_cursor: usize,
|
||||
notes_scroll: u16,
|
||||
active_field: usize,
|
||||
) {
|
||||
let popup_area = centered_rect(75, 14, area);
|
||||
@@ -382,7 +383,8 @@ pub fn render_edit_task_popup(
|
||||
let notes_lines: Vec<Line> = notes.lines().map(|l| Line::from(Span::raw(l.to_string()))).collect();
|
||||
let notes_para = Paragraph::new(Text::from(notes_lines))
|
||||
.block(notes_block)
|
||||
.wrap(Wrap { trim: false });
|
||||
.wrap(Wrap { trim: false })
|
||||
.scroll((notes_scroll, 0));
|
||||
frame.render_widget(notes_para, rows[2]);
|
||||
|
||||
// ── Date buttons row ──
|
||||
|
||||
Reference in New Issue
Block a user