1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-03 15:20:05 -04:00

Support additive colors in color picker

This commit is contained in:
Emil Ernerfeldt
2021-01-03 18:03:11 +01:00
parent 5c8df6925d
commit 10a23d18e1
17 changed files with 239 additions and 106 deletions

View File

@@ -78,7 +78,7 @@ impl FrameHistory {
}];
let rect = rect.shrink(4.0);
let line_stroke = Stroke::new(1.0, Color32::additive_luminance(128));
let line_stroke = Stroke::new(1.0, Color32::from_additive_luminance(128));
if let Some(mouse_pos) = ui.input().mouse.pos {
if rect.contains(mouse_pos) {
@@ -100,7 +100,7 @@ impl FrameHistory {
}
}
let circle_color = Color32::additive_luminance(196);
let circle_color = Color32::from_additive_luminance(196);
let radius = 2.0;
let right_side_time = ui.input().time; // Time at right side of screen