Skip to content

Commit

Permalink
final touches to colors, widths etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Mar 22, 2023
1 parent bbfe3c5 commit 1a6ada8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/re_viewer/src/ui/view_spatial/scene/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const AXIS_COLOR_X: Color32 = Color32::from_rgb(255, 25, 25);
const AXIS_COLOR_Y: Color32 = Color32::from_rgb(0, 240, 0);
const AXIS_COLOR_Z: Color32 = Color32::from_rgb(80, 80, 255);

const SIZE_BOOST_IN_POINTS_FOR_LINE_OUTLINES: f32 = 2.5;
const SIZE_BOOST_IN_POINTS_FOR_LINE_OUTLINES: f32 = 1.5;
const SIZE_BOOST_IN_POINTS_FOR_POINT_OUTLINES: f32 = 2.5;

impl SceneSpatialPrimitives {
Expand Down
7 changes: 4 additions & 3 deletions crates/re_viewer/src/ui/view_spatial/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,13 +636,14 @@ pub fn create_labels(
}

pub fn outline_config(gui_ctx: &egui::Context) -> OutlineConfig {
// Take the exact same colors we have in the ui!
let selection_outline_color =
re_renderer::Rgba::from(gui_ctx.style().visuals.selection.bg_fill);
let selection_outline_color = selection_outline_color * 0.75; // Three-quarter-transparent
let hover_outline_color = (selection_outline_color * 2.0).additive();
let hover_outline_color =
re_renderer::Rgba::from(gui_ctx.style().visuals.widgets.hovered.bg_fill);

OutlineConfig {
outline_radius_pixel: (gui_ctx.pixels_per_point() * 1.25).at_least(0.5),
outline_radius_pixel: (gui_ctx.pixels_per_point() * 1.5).at_least(0.5),
color_layer_a: selection_outline_color,
color_layer_b: hover_outline_color,
}
Expand Down

0 comments on commit 1a6ada8

Please sign in to comment.