From d95478295a77eb584df24a471d5d313af1df97bd Mon Sep 17 00:00:00 2001 From: Dino Date: Tue, 3 Feb 2026 19:36:14 +0000 Subject: [PATCH] editor: Ensure that spacer blocks are visible in light themes (#48287) The color used for the slash pattern when rendering `Block::Spacer` was set to a fixed color, `0xFFFFFF10`, which is almost white, making it super hard to view in light themes, where the editor's background is almost white. As such, this commit updates that color so as to use something that is more theme-specific, ensuring that it is easily visible in both light and dark themes. Release Notes: - N/A --- crates/editor/src/element.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 6d3c7374e2c6e6fce4903066630acd2b58ba258f..beb2ccc6c36f670584ba78e326331e1b74d4adc7 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -49,8 +49,8 @@ use gpui::{ Pixels, PressureStage, ScrollDelta, ScrollHandle, ScrollWheelEvent, ShapedLine, SharedString, Size, StatefulInteractiveElement, Style, Styled, StyledText, TextAlign, TextRun, TextStyleRefinement, WeakEntity, Window, anchored, deferred, div, fill, linear_color_stop, - linear_gradient, outline, pattern_slash, point, px, quad, relative, rgba, size, - solid_background, transparent_black, + linear_gradient, outline, pattern_slash, point, px, quad, relative, size, solid_background, + transparent_black, }; use itertools::Itertools; use language::{IndentGuideSettings, language_settings::ShowWhitespaceSetting}; @@ -4005,7 +4005,11 @@ impl EditorElement { .id(block_id) .w_full() .h((*height as f32) * line_height) - .bg(pattern_slash(rgba(0xFFFFFF10), 8.0, 8.0)) + .bg(pattern_slash( + cx.theme().colors().panel_background, + 8.0, + 8.0, + )) .into_any(), };