tweaked deco colors
This commit is contained in:
parent
a879e5e089
commit
725720f1cb
1 changed files with 7 additions and 5 deletions
|
|
@ -173,7 +173,7 @@ impl DecorationsDataSatellite {
|
|||
|
||||
// Draw the bar and its components
|
||||
let mut bar = Pixmap::new(drawn_width as u32, drawn_height as u32).unwrap();
|
||||
bar.fill(Color::WHITE);
|
||||
bar.fill(Color::from_rgba(0.2, 0.2, 0.2, 1.0).unwrap());
|
||||
|
||||
if let Some(title) = title {
|
||||
bar.draw_pixmap(
|
||||
|
|
@ -350,9 +350,9 @@ fn draw_pixmap_to_buffer(pixmap: &Pixmap, buffer: &mut [u8]) {
|
|||
fn x_pixmap(bar_height: u32, scale: f32, hovered: bool) -> Pixmap {
|
||||
let mut x = Pixmap::new(bar_height, bar_height).unwrap();
|
||||
if hovered {
|
||||
x.fill(Color::from_rgba(1.0, 0.0, 0.0, 0.8).unwrap());
|
||||
x.fill(Color::from_rgba(1.0, 0.2, 0.2, 0.8).unwrap());
|
||||
} else {
|
||||
x.fill(Color::WHITE);
|
||||
x.fill(Color::from_rgba(0.2, 0.2, 0.2, 1.0).unwrap());
|
||||
}
|
||||
let size = x.width() as f32;
|
||||
let margin = 8.4 * scale;
|
||||
|
|
@ -363,9 +363,11 @@ fn x_pixmap(bar_height: u32, scale: f32, hovered: bool) -> Pixmap {
|
|||
line.move_to(size - margin, margin);
|
||||
line.line_to(margin, size - margin);
|
||||
let line = line.finish().unwrap();
|
||||
let mut paint = Paint::default();
|
||||
paint.set_color(Color::WHITE);
|
||||
x.stroke_path(
|
||||
&line,
|
||||
&Default::default(),
|
||||
&paint,
|
||||
&Stroke {
|
||||
width: scale + 0.5,
|
||||
..Default::default()
|
||||
|
|
@ -400,7 +402,7 @@ fn title_pixmap(title: &str, max_width: u32, height: u32, scale: f32) -> Option<
|
|||
((bounds.min.x as u32 + x) + (bounds.min.y as u32 + y) * width) as usize;
|
||||
|
||||
data[pixel_idx] =
|
||||
ColorU8::from_rgba(0, 0, 0, (coverage * 255.0) as u8).premultiply();
|
||||
ColorU8::from_rgba(255, 255, 255, (coverage * 255.0) as u8).premultiply();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue