Use custom color wrapper type everywhere in gpui & zed

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2021-08-03 12:48:58 -07:00
co-authored by Nathan Sobo
parent fa01273466
commit ef0ffbe819
20 changed files with 319 additions and 233 deletions
+7 -7
View File
@@ -1,5 +1,5 @@
use gpui::{
color::ColorU,
color::Color,
fonts::{Properties, Weight},
DebugContext, Element as _, Quad,
};
@@ -82,17 +82,17 @@ impl gpui::Element for TextElement {
text,
font_size,
&[
(1, normal, ColorU::default()),
(1, bold, ColorU::default()),
(1, normal, ColorU::default()),
(1, bold, ColorU::default()),
(text.len() - 4, normal, ColorU::default()),
(1, normal, Color::default()),
(1, bold, Color::default()),
(1, normal, Color::default()),
(1, bold, Color::default()),
(text.len() - 4, normal, Color::default()),
],
);
cx.scene.push_quad(Quad {
bounds: bounds,
background: Some(ColorU::white()),
background: Some(Color::white()),
..Default::default()
});
line.paint(bounds.origin(), bounds, cx);