mirror of
https://github.com/storytold/deckcraft.git
synced 2026-11-04 09:29:49 -06:00
Fix up merged PRs: split ribbon buttons carry their label once (#512's label predates main's)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0ed74b684a
commit
0ac222a543
@@ -124,10 +124,6 @@ pub fn small_button_ex(ui: &mut Ui, icon: Icon, label: &str, enabled: bool, sele
|
||||
let main_rect = Rect::from_min_max(rect.min, pos2(rect.max.x - arrow_w, rect.max.y));
|
||||
let main_resp =
|
||||
if split { ui.interact(main_rect, resp.id.with("m"), if enabled { Sense::click() } else { Sense::hover() }) } else { resp.clone() };
|
||||
// Screen readers (and UI tests) find the button by its text.
|
||||
if !label.is_empty() {
|
||||
main_resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, enabled, label));
|
||||
}
|
||||
let arrow_resp = split.then(|| {
|
||||
ui.interact(
|
||||
Rect::from_min_max(pos2(rect.max.x - arrow_w, rect.min.y), rect.max),
|
||||
|
||||
Reference in New Issue
Block a user