miniprofiler_ui: Improve MiniProfiler to use uniform list (#43457)

Release Notes:

- N/A

---

- Apply uniform_list for timing list for performance.
- Add paddings for window.
- Add space to `ms`, before: `100ms` after `100 ms`.

## Before 

<img width="1392" height="860" alt="image"
src="https://github.com/user-attachments/assets/9706a96f-7093-4d4f-832f-306948a9b17b"
/>

## After 

<img width="1392" height="864" alt="image"
src="https://github.com/user-attachments/assets/38df1b71-15e7-4101-b0c9-ecdcdb7752d7"
/>
This commit is contained in:
Jason Lee
2025-11-25 16:08:49 +01:00
committed by GitHub
parent 1cbb49864c
commit f58de21068
2 changed files with 84 additions and 67 deletions
+6 -1
View File
@@ -11,7 +11,7 @@ use crate::{
StyleRefinement, Styled, Window, point, size,
};
use smallvec::SmallVec;
use std::{cell::RefCell, cmp, ops::Range, rc::Rc};
use std::{cell::RefCell, cmp, ops::Range, rc::Rc, usize};
use super::ListHorizontalSizingBehavior;
@@ -235,6 +235,11 @@ impl UniformListScrollHandle {
false
}
}
/// Scroll to the bottom of the list.
pub fn scroll_to_bottom(&self) {
self.scroll_to_item(usize::MAX, ScrollStrategy::Bottom);
}
}
impl Styled for UniformList {