1
0
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:
Emil Ernerfeldt
2025-11-10 16:34:58 +01:00
committed by GitHub
parent fa4cfec777
commit 93425ae06b
3 changed files with 30 additions and 9 deletions

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5befd84158b582c79a968f36e43c7017187b364824eb4470b048d133e62f9360
size 1600

View File

@@ -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");
}