debugger: Add horizontal scroll bars to variable list, memory view, and breakpoint list (#41594)

Closes #40360

This PR added heuristics to determine what variable/breakpoint list
entry has the longest width when rendered. I added this in so the
uniform list would correctly determine which item has the longest width
and use that to calculate the scrollbar size.

The heuristic can be off if a non-mono space font is used in the UI; in
most cases, it's more than accurate enough though.

Release Notes:

- debugger: Add horizontal scroll bars to variable list, memory view,
and breakpoint list

---------

Co-authored-by: MrSubidubi <dev@bahn.sh>
This commit is contained in:
Anthony Eid
2025-10-30 19:43:32 +00:00
committed by GitHub
co-authored by MrSubidubi
parent 3944234bab
commit 44e5a962e6
6 changed files with 105 additions and 11 deletions
+1 -1
View File
@@ -392,7 +392,7 @@ pub struct Scrollbars<T: ScrollableHandle = ScrollHandle> {
impl Scrollbars {
pub fn new(show_along: ScrollAxes) -> Self {
Self::new_with_setting(show_along, |_| ShowScrollbar::default())
Self::new_with_setting(show_along, |_| ShowScrollbar::Always)
}
pub fn for_settings<S: ScrollbarVisibility>() -> Scrollbars {