Skip to content

Commit

Permalink
Update tests.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored May 11, 2024
1 parent 3fa69b1 commit 2ecd83c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/egui_demo_lib/src/demo/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,12 @@ fn response_summary(response: &egui::Response, show_hovers: bool) -> String {
egui::PointerButton::Extra1,
egui::PointerButton::Extra2,
] {
let button_suffix = format!(" : {button:?} button");
let button_suffix = if button == egui::PointerButton::Primary {
// Reduce visual clutter in common case:
String::default()
} else {
format!(" by {button:?} button")
};

// These are in inverse logical/chonological order, because we show them in the ui that way:

Expand Down

0 comments on commit 2ecd83c

Please sign in to comment.