Support additive colors in color picker

This commit is contained in:
Emil Ernerfeldt
2021-01-03 18:16:12 +01:00
parent 5c8df6925d
commit 10a23d18e1
17 changed files with 239 additions and 106 deletions
+2 -2
View File
@@ -93,7 +93,7 @@ impl DemoWindow {
let painter = ui.painter();
let c = response.rect.center();
let r = response.rect.width() / 2.0 - 1.0;
let color = Color32::gray(128);
let color = Color32::from_gray(128);
let stroke = Stroke::new(1.0, color);
painter.circle_stroke(c, r, stroke);
painter.line_segment([c - vec2(0.0, r), c + vec2(0.0, r)], stroke);
@@ -210,7 +210,7 @@ impl BoxPainting {
ui.painter().rect(
response.rect,
self.corner_radius,
Color32::gray(64),
Color32::from_gray(64),
Stroke::new(self.stroke_width, Color32::WHITE),
);
}