tweaked deco colors

This commit is contained in:
Brian Hrebec 2026-03-31 11:39:44 -05:00
parent a879e5e089
commit 725720f1cb

View file

@ -173,7 +173,7 @@ impl DecorationsDataSatellite {
// Draw the bar and its components // Draw the bar and its components
let mut bar = Pixmap::new(drawn_width as u32, drawn_height as u32).unwrap(); 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 { if let Some(title) = title {
bar.draw_pixmap( 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 { fn x_pixmap(bar_height: u32, scale: f32, hovered: bool) -> Pixmap {
let mut x = Pixmap::new(bar_height, bar_height).unwrap(); let mut x = Pixmap::new(bar_height, bar_height).unwrap();
if hovered { 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 { } 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 size = x.width() as f32;
let margin = 8.4 * scale; 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.move_to(size - margin, margin);
line.line_to(margin, size - margin); line.line_to(margin, size - margin);
let line = line.finish().unwrap(); let line = line.finish().unwrap();
let mut paint = Paint::default();
paint.set_color(Color::WHITE);
x.stroke_path( x.stroke_path(
&line, &line,
&Default::default(), &paint,
&Stroke { &Stroke {
width: scale + 0.5, width: scale + 0.5,
..Default::default() ..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; ((bounds.min.x as u32 + x) + (bounds.min.y as u32 + y) * width) as usize;
data[pixel_idx] = 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();
}); });
} }
} }