feat(styles): green ✓ for current style + resolve it from DWG files

- The current-style marker is now a green ✓ in its own fixed-width column
  so names stay aligned; rendered as a separate coloured glyph rather than
  baked into the label string.
- Resolve the current text / dimension / multiline style from the handle
  the DWG header stores into the name the app reads (fix_current_style_names
  on load). DXF already provides these as names ($TEXTSTYLE / $DIMSTYLE /
  $CMLSTYLE); DWG only stores handles, so the marker previously always fell
  back to "Standard". Only overrides when the handle resolves.

Note: table and multileader current styles are not surfaced by the file
reader (no header name/handle exposed), so those markers still default to
the app's active selection until acadrust exposes them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-10 15:56:13 +03:00
1 parent 885bacd0f6
commit b3ba3a53d1
3 files changed
+56 -13

No files matched your search

+2 -8
View File
@@ -114,16 +114,10 @@ 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}")
} else {
format!(" {name}")
};
let is_current = s.current == Some(name.as_str());
crate::ui::style_list::item(
name,
label,
is_current,
is_sel,
s.kind,
(s.on_select)(name.clone()),