diff --git a/crates/ui-egui/src/dialogs/bookmarks.rs b/crates/ui-egui/src/dialogs/bookmarks.rs index dede4a86cf..70d4c96a07 100644 --- a/crates/ui-egui/src/dialogs/bookmarks.rs +++ b/crates/ui-egui/src/dialogs/bookmarks.rs @@ -13,7 +13,7 @@ use craft::ui::runtime::env::{Env, Label}; use serde::{Deserialize, Serialize}; use wordcraft_render::icon_lib::{self, Category}; -use super::host::{Asks, DialogHooks, Settle, WordForm, open_form, open_with}; +use super::host::{Asks, DialogHooks, Settle, WordForm, captioned, open_form, open_with}; use super::{Value, WordApp}; use egui::Ui; use serde_json::json; @@ -113,13 +113,15 @@ impl StackDialog for BookmarkDialog { .name_box(Bind::bound(name)) .name_check(|n| wordcraft_engine::cmd::insert::bookmark_name_ok(n.trim())) .under_list(move |ui| { - RadioGroup::new(Label::from(tl!("Sort by:")), Bind::bound(&mut *by_location)).show(ui, |ui, _| { - Stack::new().show(ui, |ui, cx| { - for (at, (value, label)) in [(false, "Name"), (true, "Location")].into_iter().enumerate() { - let side = SideLabel::new().layout(FieldLayout::After); - cx.labelled(ui, at, Label::from(tl!(label)), side, Radio::new(value)); - } - }); + captioned(ui, Label::from(tl!("Sort by:")), |name, ui| { + RadioGroup::new(name, Bind::bound(&mut *by_location)).show(ui, |ui, _| { + Stack::new().show(ui, |ui, cx| { + for (at, (value, label)) in [(false, "Name"), (true, "Location")].into_iter().enumerate() { + let side = SideLabel::new().layout(FieldLayout::After); + cx.labelled(ui, at, Label::from(tl!(label)), side, Radio::new(value)); + } + }); + }) }); Checkbox::new(Bind::bound(&mut *hidden)).label(Label::from(tl!("Hidden bookmarks"))).show(ui); });