Compare commits

..
Author SHA1 Message Date
Martin BallandClaude Opus 5.5 24d3cddc8c Bookmark: the Sort by label is back (#7976)
The Sort by radio group had no caption row after the craft-ui port; wrap it in captioned() as #8026 did for the other dialogs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCWNarDG3QfXK2YMzdx
2026-11-30 12:40:58 +00:00
+10 -8
View File
@@ -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);
});