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

Swap overlay order of selection & hover outlines #1705

Merged
merged 1 commit into from
Mar 25, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions crates/re_viewer/src/misc/selection_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,12 @@ impl SelectionState {
let mut next_selection_mask = || {
// We don't expect to overflow u8, but if we do, don't use the "background mask".
selection_mask_index = selection_mask_index.wrapping_add(1).at_least(1);
OutlineMaskPreference::some(selection_mask_index, 0)
OutlineMaskPreference::some(0, selection_mask_index)
};
let mut next_hover_mask = || {
// We don't expect to overflow u8, but if we do, don't use the "background mask".
hover_mask_index = hover_mask_index.wrapping_add(1).at_least(1);
OutlineMaskPreference::some(0, hover_mask_index)
OutlineMaskPreference::some(hover_mask_index, 0)
};

for current_selection in self.selection.iter() {
Expand Down
4 changes: 2 additions & 2 deletions crates/re_viewer/src/ui/view_spatial/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ pub fn outline_config(gui_ctx: &egui::Context) -> OutlineConfig {

OutlineConfig {
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,
color_layer_a: hover_outline_color,
color_layer_b: selection_outline_color,
}
}