mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Rename Srgba to Color32
This commit is contained in:
@@ -57,7 +57,7 @@ impl super::View for DancingStrings {
|
||||
let thickness = 10.0 / mode;
|
||||
cmds.push(paint::PaintCmd::line(
|
||||
points,
|
||||
Stroke::new(thickness, Srgba::additive_luminance(196)),
|
||||
Stroke::new(thickness, Color32::additive_luminance(196)),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -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 = Srgba::gray(128);
|
||||
let color = Color32::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);
|
||||
@@ -212,7 +212,7 @@ impl BoxPainting {
|
||||
ui.painter().rect(
|
||||
response.rect,
|
||||
self.corner_radius,
|
||||
Srgba::gray(64),
|
||||
Color32::gray(64),
|
||||
Stroke::new(self.stroke_width, WHITE),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct Widgets {
|
||||
radio: Enum,
|
||||
sliders: super::Sliders,
|
||||
angle: f32,
|
||||
color: Srgba,
|
||||
color: Color32,
|
||||
single_line_text_input: String,
|
||||
multiline_text_input: String,
|
||||
toggle_switch: bool,
|
||||
|
||||
Reference in New Issue
Block a user