Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set egui expansion to 0.0 and selection stroke to 1px #8679

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading