ui: Follow-up improvements to the scrollbar component (#38178)

This PR lands some more improvements to the reworked scrollbars.

Namely, we will now explicitly paint a background in cases where a track
is requested for the specific scrollbar, which prevents a flicker, and
also reserve space only if space actually needs to be reserved. The
latter was a regression introduced by the recent changes.

Release Notes:

- N/A
This commit is contained in:
Finn Evers
2025-09-15 09:53:33 +00:00
committed by GitHub
parent cfb2925169
commit 4a582504d4
5 changed files with 80 additions and 24 deletions
+4 -1
View File
@@ -3748,7 +3748,10 @@ impl GitPanel {
.custom_scrollbars(
Scrollbars::for_settings::<GitPanelSettings>()
.tracked_scroll_handle(self.scroll_handle.clone())
.with_track_along(ScrollAxes::Horizontal),
.with_track_along(
ScrollAxes::Horizontal,
cx.theme().colors().panel_background,
),
window,
cx,
),