From 7137bdee02e1c5556f9e758203d46b5874a99399 Mon Sep 17 00:00:00 2001 From: TOULAR <129332761+TOULR@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:47:17 +0100 Subject: [PATCH] Fix scrollbar not always being on top (#20665) Set the elevation of the scrollbar to 1 borderless, so that the blue outline is no longer above the scrollbar. Closes #19875 Release Notes: - N/A --------- Co-authored-by: Peter Tripp --- crates/ui/src/components/scrollbar.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui/src/components/scrollbar.rs b/crates/ui/src/components/scrollbar.rs index eceddb02ddfa67b750b56b4071f38bca8733d9ef..c8f09439c336a7dc80963bad550c515f190aa773 100644 --- a/crates/ui/src/components/scrollbar.rs +++ b/crates/ui/src/components/scrollbar.rs @@ -228,7 +228,9 @@ impl Element for Scrollbar { ) { cx.with_content_mask(Some(ContentMask { bounds }), |cx| { let colors = cx.theme().colors(); - let thumb_background = colors.scrollbar_thumb_background; + let thumb_background = colors + .surface_background + .blend(colors.scrollbar_thumb_background); let is_vertical = self.kind == ScrollbarAxis::Vertical; let extra_padding = px(5.0); let padded_bounds = if is_vertical {