forked from 1b-agent/opencadstudio-upstream
feat(styles): mark the current style with a ✓ in the list
Every style manager now shows a leading ✓ next to the current style (current text/dim style, active table/multileader/multiline style), with the other rows padded so names stay aligned. The marker replaces the multileader/multiline-only ◀ and is wired for all five managers by threading the current-style name into each view. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
de4eb31003
commit
885bacd0f6
5 files changed
+19
-5
No files matched your search
@@ -114,10 +114,12 @@ pub fn view<'a, 'b>(s: Scaffold<'a, 'b>) -> Element<'a, Message> {
|
||||
.iter()
|
||||
.map(|name| {
|
||||
let is_sel = name.as_str() == s.selected;
|
||||
// Mark the current style with a leading ✓; pad the rest so names
|
||||
// line up.
|
||||
let label = if s.current == Some(name.as_str()) {
|
||||
format!("{name} ◀")
|
||||
format!("✓ {name}")
|
||||
} else {
|
||||
name.clone()
|
||||
format!(" {name}")
|
||||
};
|
||||
crate::ui::style_list::item(
|
||||
name,
|
||||
|
||||
Reference in new issue
Block a user