colorfull
This commit is contained in:
24
src/music.rs
24
src/music.rs
@@ -176,22 +176,13 @@ impl canvas::Program<Message> for Music {
|
||||
iced::Point { x: x, y: 0.0 },
|
||||
frame.size(),
|
||||
if toggle_color {
|
||||
Color::from_rgb(0.3, 0.3, 0.3)
|
||||
Color::from_rgb8(27, 60, 83)
|
||||
} else {
|
||||
Color::from_rgb(0.1, 0.1, 0.1)
|
||||
Color::from_rgb8(69, 104, 130)
|
||||
},
|
||||
);
|
||||
toggle_color = !toggle_color;
|
||||
}
|
||||
frame.stroke_rectangle(
|
||||
iced::Point { x: 0.0, y: 0.0 },
|
||||
frame.size(),
|
||||
Stroke {
|
||||
width: 16.0,
|
||||
..Stroke::default()
|
||||
},
|
||||
);
|
||||
|
||||
let x = self.current_delta / self.length * w + 8.;
|
||||
frame.stroke_rectangle(
|
||||
iced::Point::new(x, 0.),
|
||||
@@ -201,7 +192,16 @@ impl canvas::Program<Message> for Music {
|
||||
},
|
||||
Stroke {
|
||||
width: 4.0,
|
||||
style: Style::Solid(Color::from_rgb(1.0, 0.0, 0.0)),
|
||||
style: Style::Solid(Color::from_rgba(1.0, 0.0, 0.0, 1.)),
|
||||
..Stroke::default()
|
||||
},
|
||||
);
|
||||
frame.stroke_rectangle(
|
||||
iced::Point { x: 0.0, y: 0.0 },
|
||||
frame.size(),
|
||||
Stroke {
|
||||
width: 16.0,
|
||||
style: Style::Solid(Color::from_rgb8(207, 74, 28)),
|
||||
..Stroke::default()
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user