Skip to content

Commit

Permalink
Set egui expansion to 0.0 and selection stroke to 1px
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Jan 14, 2025
1 parent 63012cd commit 45ff4d2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crates/viewer/re_ui/src/design_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ impl DesignTokens {
}

{
egui_style.visuals.widgets.hovered.expansion = 2.0;
egui_style.visuals.widgets.active.expansion = 2.0;
egui_style.visuals.widgets.open.expansion = 2.0;
egui_style.visuals.widgets.hovered.expansion = 0.0;
egui_style.visuals.widgets.active.expansion = 0.0;
egui_style.visuals.widgets.open.expansion = 0.0;
}

egui_style.visuals.selection.bg_fill = self.color(ColorToken::blue(S350));
Expand All @@ -194,7 +194,9 @@ impl DesignTokens {
egui_style.visuals.widgets.inactive.fg_stroke.color = default; // button text
egui_style.visuals.widgets.active.fg_stroke.color = strong; // strong text and active button text

let wide_stroke_width = 2.0; // Make it a bit more visible, especially important for spatial primitives.
// Visually, this is the same as 2.0 for spatial primitive (for some reason). Having it set
// at 1.0 is lighter and more compact for text edit though.
let wide_stroke_width = 1.0;
egui_style.visuals.widgets.active.fg_stroke.width = wide_stroke_width;
egui_style.visuals.selection.stroke.width = wide_stroke_width;

Expand Down

0 comments on commit 45ff4d2

Please sign in to comment.