mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 14:49:06 -04:00
Allow multiple atoms in Button::shortcut_text and right_text (#7696)
Useful when intermixing text and icons (e.g. for modifiers)
This commit is contained in:
3
tests/egui_tests/tests/snapshots/button_shortcut.png
Normal file
3
tests/egui_tests/tests/snapshots/button_shortcut.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5befd84158b582c79a968f36e43c7017187b364824eb4470b048d133e62f9360
|
||||
size 1600
|
||||
@@ -108,3 +108,14 @@ fn test_intrinsic_size() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_button_shortcut_text() {
|
||||
let mut harness = HarnessBuilder::default().build_ui(|ui| {
|
||||
ui.add(egui::Button::new("Click me").shortcut_text(("1", "2", "3")));
|
||||
});
|
||||
harness.run();
|
||||
harness.fit_contents();
|
||||
|
||||
harness.snapshot("button_shortcut");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user