mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-30 09:45:15 -06:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24d3cddc8c |
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user