Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Pull scrollbar colors from theme

Marshall Bowers89884d289f69
diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs
index 01eec607cd0..e8b1071a30d 100644
--- a/crates/editor2/src/element.rs
+++ b/crates/editor2/src/element.rs
@@ -1276,9 +1276,9 @@ impl EditorElement {
cx.paint_quad(
track_bounds,
Corners::default(),
- gpui::blue(), // todo!("style.track.background_color")
- Edges::default(), // todo!("style.track.border")
- transparent_black(), // todo!("style.track.border")
+ cx.theme().colors().scrollbar_track_background,
+ Edges::default(), // todo!("style.track.border")
+ cx.theme().colors().scrollbar_track_border,
);
let scrollbar_settings = EditorSettings::get_global(cx).scrollbar;
if layout.is_singleton && scrollbar_settings.selections {
@@ -1302,14 +1302,14 @@ impl EditorElement {
cx.paint_quad(
bounds,
Corners::default(),
- gpui::yellow(), // todo!("theme.editor.scrollbar")
+ cx.theme().colors().scrollbar_thumb_background,
Edges {
top: Pixels::ZERO,
right: px(1.),
bottom: Pixels::ZERO,
left: px(1.),
},
- gpui::green(), // todo!("style.thumb.border.color")
+ cx.theme().colors().scrollbar_thumb_border,
);
}
}