|
1 | 1 | use super::utility_functions::overlay_canvas_context; |
2 | 2 | use crate::consts::{ |
3 | | - COLOR_OVERLAY_BLUE, COLOR_OVERLAY_BLUE_50, COLOR_OVERLAY_GREEN, COLOR_OVERLAY_RED, COLOR_OVERLAY_WHITE, COLOR_OVERLAY_YELLOW, COMPASS_ROSE_ARROW_SIZE, COMPASS_ROSE_HOVER_RING_DIAMETER, |
| 3 | + COLOR_OVERLAY_BLUE, COLOR_OVERLAY_GREEN, COLOR_OVERLAY_ORANGE, COLOR_OVERLAY_RED, COLOR_OVERLAY_WHITE, COLOR_OVERLAY_YELLOW, COMPASS_ROSE_ARROW_SIZE, COMPASS_ROSE_HOVER_RING_DIAMETER, |
4 | 4 | COMPASS_ROSE_MAIN_RING_DIAMETER, COMPASS_ROSE_RING_INNER_DIAMETER, DOWEL_PIN_RADIUS, MANIPULATOR_GROUP_MARKER_SIZE, PIVOT_CROSSHAIR_LENGTH, PIVOT_CROSSHAIR_THICKNESS, PIVOT_DIAMETER, |
5 | 5 | }; |
6 | 6 | use crate::messages::prelude::Message; |
@@ -431,10 +431,7 @@ impl OverlayContext { |
431 | 431 |
|
432 | 432 | pub fn draw_scale(&mut self, start: DVec2, scale: f64, radius: f64, text: &str) { |
433 | 433 | let sign = scale.signum(); |
434 | | - let mut fill_color = graphene_std::Color::from_rgb_str(crate::consts::COLOR_OVERLAY_WHITE.strip_prefix('#').unwrap()) |
435 | | - .unwrap() |
436 | | - .with_alpha(0.05) |
437 | | - .to_rgba_hex_srgb(); |
| 434 | + let mut fill_color = Color::from_rgb_str(COLOR_OVERLAY_WHITE.strip_prefix('#').unwrap()).unwrap().with_alpha(0.05).to_rgba_hex_srgb(); |
438 | 435 | fill_color.insert(0, '#'); |
439 | 436 | let fill_color = Some(fill_color.as_str()); |
440 | 437 | self.line(start + DVec2::X * radius * sign, start + DVec2::X * (radius * scale), None, None); |
@@ -471,10 +468,7 @@ impl OverlayContext { |
471 | 468 |
|
472 | 469 | // Hover ring |
473 | 470 | if show_hover_ring { |
474 | | - let mut fill_color = graphene_std::Color::from_rgb_str(COLOR_OVERLAY_BLUE.strip_prefix('#').unwrap()) |
475 | | - .unwrap() |
476 | | - .with_alpha(0.5) |
477 | | - .to_rgba_hex_srgb(); |
| 471 | + let mut fill_color = Color::from_rgb_str(COLOR_OVERLAY_BLUE.strip_prefix('#').unwrap()).unwrap().with_alpha(0.5).to_rgba_hex_srgb(); |
478 | 472 | fill_color.insert(0, '#'); |
479 | 473 |
|
480 | 474 | self.render_context.set_line_width(HOVER_RING_STROKE_WIDTH); |
@@ -560,7 +554,7 @@ impl OverlayContext { |
560 | 554 |
|
561 | 555 | pub fn dowel_pin(&mut self, position: DVec2, angle: f64, color: Option<&str>) { |
562 | 556 | let (x, y) = (position.round() - DVec2::splat(0.5)).into(); |
563 | | - let color = color.unwrap_or(COLOR_OVERLAY_YELLOW); |
| 557 | + let color = color.unwrap_or(COLOR_OVERLAY_ORANGE); |
564 | 558 |
|
565 | 559 | self.start_dpi_aware_transform(); |
566 | 560 |
|
@@ -637,9 +631,11 @@ impl OverlayContext { |
637 | 631 | pub fn outline_overlay_bezier(&mut self, bezier: Bezier, transform: DAffine2) { |
638 | 632 | self.start_dpi_aware_transform(); |
639 | 633 |
|
| 634 | + let color = Color::from_rgb_str(COLOR_OVERLAY_BLUE.strip_prefix('#').unwrap()).unwrap().with_alpha(0.05).to_rgba_hex_srgb(); |
| 635 | + |
640 | 636 | self.render_context.begin_path(); |
641 | 637 | self.bezier_command(bezier, transform, true); |
642 | | - self.render_context.set_stroke_style_str(COLOR_OVERLAY_BLUE_50); |
| 638 | + self.render_context.set_stroke_style_str(&color); |
643 | 639 | self.render_context.set_line_width(4.); |
644 | 640 | self.render_context.stroke(); |
645 | 641 |
|
|
0 commit comments