fix: use text area bounds to determine visibility

This commit is contained in:
Jose Acevedo 2024-12-10 13:33:03 -05:00 committed by Héctor Ramón Jiménez
parent 40861cd933
commit 114cfa3e02
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -76,7 +76,7 @@ impl TextRenderer {
let start_y = (text_area.top + run.line_top) as i32;
let end_y = (text_area.top + run.line_top + run.line_height) as i32;
start_y <= bounds_max_y && bounds_min_y <= end_y
start_y <= text_area.bounds.bottom && text_area.bounds.top <= end_y
};
let layout_runs = text_area