Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 12 additions & 19 deletions crates/ui/src/input/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2122,25 +2122,18 @@ impl Element for TextElement {
if let Some(line_numbers) = prepaint.line_numbers.as_ref() {
offset_y += invisible_top_padding;

// Gutter background: prefer the dedicated `editor.gutter.background`
// theme key, falling back to the editor background so existing
// themes render unchanged.
let gutter_bg = cx
.theme()
.highlight_theme
.style
.editor_gutter_background
.unwrap_or_else(|| cx.theme().editor_background());
window.paint_quad(fill(
Bounds {
origin: input_bounds.origin,
size: size(
prepaint.last_layout.line_number_width - LINE_NUMBER_RIGHT_MARGIN,
input_bounds.size.height + prepaint.ghost_lines_height,
),
},
gutter_bg,
));
if let Some(gutter_bg) = cx.theme().highlight_theme.style.editor_gutter_background {
window.paint_quad(fill(
Bounds {
origin: input_bounds.origin,
size: size(
prepaint.last_layout.line_number_width - LINE_NUMBER_RIGHT_MARGIN,
input_bounds.size.height + prepaint.ghost_lines_height,
),
},
gutter_bg,
));
}

// Each item is the normal lines.
for (lines, &buffer_line) in line_numbers
Expand Down
Loading