Commit graph cad-editor/src/app/view/mod.rs
Author SHA1 Message Date
Hakan Seven
523b85f42b fix(units): make the units selector reach what it names
The status-bar units button wrote INSUNITS, which nothing on screen reads.
INSUNITS only tells the drawing how to scale content arriving from
elsewhere, so picking a unit relabelled the drawing and changed nothing
visible — the selector looked broken because the variable it moved was
invisible.

Point the button at LUNITS instead, the setting that decides how every
coordinate and distance is written, and give the three questions the word
"units" runs together a place each:

- The button offers the five length formats, each shown beside a sample of
  itself, so Engineering and Architectural are told apart by sight.
- UNITS / DDUNITS opens a real dialog: length and angle format and
  precision, the direction angle zero points, whether positive angles run
  clockwise, and the insertion unit. Its sample comes from the same
  formatters the drawing uses, so it cannot drift from the readout.
- DWGUNITS converts. Model geometry, viewport framing, the header's length
  defaults and each dimension style's scale all move together in one undo
  step; paper space is left alone, since the sheet is still the same sheet.
  Locked layers are converted too — a half-converted drawing would be at
  two scales at once.

The coordinate readout formatted at four decimal places whatever the
drawing asked for; it now goes through the same format_length the
properties panel uses. That made the angle formats reachable in turn, so
degrees-minutes-seconds now carries the d/'/" marks that say which
convention it is, and surveyor's units are written at all.

Typed input is still plain decimal: a length the readout writes as
5'-6 1/2" cannot yet be typed back. ANGBASE and ANGDIR are stored but not
yet applied to displayed directions.

Closes #668

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 19:59:09 +03:00
Hakan Seven
b5a1146966 feat(view): one list of visual styles behind every way of choosing one
The ribbon offered four styles and dispatched each one's id as a command.
Two of those ids were not visual-style commands: "Shaded" carried SOLID,
which draws a 2D filled polygon, so choosing it started a draw command;
"Hidden" carried HIDDEN, which matched nothing at all, so it did nothing.
The intent had been for the button to fire its tool's event, but the
dropdown never reads one -- it dispatches the id.

Behind that sat two generations of the same feature. The render-mode
picker offered the seven styles a viewport can actually be drawn in;
everything else -- the ribbon, VSCURRENT, SHADEMODE, VISUALSTYLES and a
handful of bare verbs -- went through a binary wireframe-or-shaded flag
that could only approximate them, reporting "Hidden (shown shaded)" and
"X-Ray (shown as wireframe)" when asked for something it had no way to
draw. Four descriptions of one choice, each drifting on its own.

There is one list now. Each style names itself once -- mode, label, icon,
and the command that applies it -- and the ribbon, the picker, the
VISUALSTYLES verb and the interactive prompt all read from it, down to
the line that lists the choices, so what is offered cannot disagree with
what works. Keywords are the render modes' own names, since there is one
set of styles left to name.

The binary path is gone rather than kept alongside: its message, its
module event, the tool definitions that produced it, the ribbon's
special-cased highlight arms, the bare style verbs and the older keyword
spellings. X-Ray goes with it -- no render mode draws one, and it was
already coming out as a plain wireframe. Three files that had been left
holding a single icon constant each fold into the list.

Note: ModuleEvent::SetWireframe leaves the plugin API with it.

Closes #621

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 14:15:59 +03:00
Karim Jerbi
8f009d0058 feat(insert): add docked block palette
Add a searchable block palette with previews, file import, collision-safe nested definitions, and dependency/table-record import. Keep palette thumbnails current across drawing switches and block-definition edits.
2026-08-06 11:02:52 +03:00
Hakan Seven
afc94dce13 feat(qselect): expand filter workflow
Refs #511
2026-08-05 13:40:53 +03:00
Hakan Seven
deaecdfb1e fix(ribbon): mask tools on start
Refs #494

Refs #507
2026-08-05 00:52:52 +03:00
Hakan Seven
474bfcc7db fix(input): restore arrow key navigation
Route editor and command-line arrows by active context and recall successfully dispatched commands.\n\nRefs #485
2026-08-05 00:08:35 +03:00
Hakan Seven
b1d55c6a7e feat(view): add visual style previews
- preview render modes on hover without committing
- distinguish 2D and 3D wireframe fill and depth behavior

Refs #483
2026-08-04 21:23:25 +03:00
Hakan Seven
7c893d8f5f feat(ui): refine drawing tabs
Use theme-driven active and hover states, integrate close controls, and keep tab spacing stable across drawing states.

Refs #481
2026-08-04 19:04:59 +03:00
Hakan Seven
d1f9055901 feat(ui): refine ribbon and view navigation 2026-08-04 18:21:52 +03:00
Hakan Seven
c9550b48f9 feat(properties): refine quick properties
- Keep the floating panel near the selection and inside the viewport
- Persist the toggle and hide the panel without a selection
- Show only Material in 3D Visualization
2026-08-04 17:32:06 +03:00
Hakan Seven
5ad95d1d2e fix(context-menu): keep menu inside viewport
Refs #457
2026-08-04 17:10:27 +03:00
Hakan Seven
b0806679c9 feat(command-line): resize history panel
Refs #456
2026-08-04 16:54:59 +03:00
Hakan Seven
539d83de47 feat(grips): improve direct editing
Refit arcs from fixed control points and highlight hovered grips.
Let Lengthen preview from the cursor or accept a typed distance.
2026-08-04 16:27:03 +03:00
Hakan Seven
2f86bfde8e feat(input): add editable shortcut table
Persist all active bindings and route keyboard events through the configured table.\n\nRefs #449
2026-08-04 15:35:06 +03:00
Hakan Seven
fb0f409bfd feat(input): expand shortcut support 2026-08-04 14:20:02 +03:00
Hakan Seven
4be8d9735c feat(ui): add dockable properties panel
Preserve panel width across left/right docking and persist resize, position, and auto-collapse preferences.

Refs #348
Refs #650
2026-08-04 13:46:02 +03:00
Hakan Seven
63c8245f98 fix: normalize recent Patreon support 2026-08-04 12:17:21 +03:00
Hakan Seven
feb110404c fix(ui): correct supporter data and labels 2026-08-03 22:08:22 +03:00
Hakan Seven
9e90e50662 feat(io): add user-approved recovery 2026-08-03 12:47:48 +03:00
Hakan Seven
d06a1022f2 fix(input): handle @/# coordinate modes 2026-08-02 23:32:54 +03:00
Hakan Seven
3e6693b93f feat(locale): localize full interface 2026-08-02 22:09:25 +03:00
Hakan Seven
b90b3e3ecf feat(locale): add Fluent translations
Default to the platform language with persisted overrides across native and web builds.

Refs #630
2026-08-02 18:53:38 +03:00
Hakan Seven
e03e091b3c feat(annotation): integrate object contexts 2026-08-02 12:00:15 +03:00
Hakan Seven
796d7d91d0 fix(ui): auto-size modal dialogs
Measure dialog content before fill layout so fields stay visible.\nKeep the MText preview width tied to its toolbar width.\n\nRefs #608
2026-08-01 18:24:05 +03:00
Hakan Seven
9382a412df fix(viewport): adapt layout crosshair contrast
Choose the sheet or desk surface under the cursor instead of the active input space so MSPACE stays visible on light paper.\n\nRefs #611
2026-07-31 23:47:41 +03:00
Hakan Seven
a66940a3f0 feat(grip): support multi-grip editing
Refs #606
2026-07-31 22:05:30 +03:00
Hakan Seven
325beaea44 fix(mtext): sync wrap width ruler 2026-07-31 14:18:11 +03:00
Hakan Seven
7285e3de51 fix(viewport): improve cursor and paper contrast
Derive crosshair color from drawing background instead of UI theme.
Use RGB 138 for Paper Space desk background.

Refs #594
2026-07-31 10:19:02 +03:00
Hakan Seven
c9aab122f0 feat(find): add find and replace
Closes #583
2026-07-30 17:56:54 +03:00
Hakan Seven
4af141ebec fix(start): unify action button shape
Closes #584
2026-07-30 17:06:30 +03:00
Hakan Seven
5116369dec refactor(ui): adopt iced layout widgets 2026-07-30 15:40:51 +03:00
Hakan Seven
c9c3d3b1bf refactor(ui): adopt iced color picker
Remove local Pin/PickList wrappers and the ACI grid.\nBlock viewport input behind the picker and load iced_aw glyphs.
2026-07-30 15:19:58 +03:00
Hakan Seven
3ab8dc3ca5 fix(ui): make modal layouts intrinsic
Pin Iced 0.15 so dialogs can measure content before distributing the resolved frame across child panels. Keep the web plugin notice compact and non-resizable.\n\nCloses #582
2026-07-30 14:47:28 +03:00
Hakan Seven
2688ffbd6b fix(ui): filter scales by drawing units
Refs #578
2026-07-30 11:13:04 +03:00
Hakan Seven
4310405ce3 fix(start): reserve command line space
Closes #546
2026-07-29 23:35:46 +03:00
Hakan Seven
8cd1b05987 fix(web): hide native tab actions
Closes #547
2026-07-29 23:31:12 +03:00
Hakan Seven
fd8b206515 feat(start): add OpenAEC sponsor 2026-07-29 21:38:19 +03:00
Hakan Seven
6ecd67ff6e feat(layer-state): add saved-state editor 2026-07-29 18:39:55 +03:00
Hakan Seven
1e624cc6b7 feat(layers): add native state manager
Replace session-only layer snapshots with drawing-backed DWG and DXF states, exposed through the ribbon and LAYERSTATE commands.\n\nCloses #562
2026-07-29 18:00:41 +03:00
Hakan Seven
cd1378e6b2 fix(viewport): preserve tiled pane controls 2026-07-29 17:21:57 +03:00
Hakan Seven
fcc6e1f8e1 fix(web): link plugins to desktop app
Keep browser entry points visible while explaining that native
plugins require a desktop install.

Refs #567
2026-07-29 16:28:20 +03:00
Hakan Seven
2424eeb74d fix(web): hide unsupported plugin manager
Fixes #567
2026-07-29 16:17:17 +03:00
Hakan Seven
6686141d3b feat(hatch): add visual pattern picker
Closes #566
2026-07-29 15:46:53 +03:00
Hakan Seven
4e25e88c31 feat(plugins): redesign plugin manager 2026-07-29 14:27:32 +03:00
Hakan Seven
969a7605b7 feat(web): show recent thumbnails
Cache previews in OPFS and migrate existing recent entries by reading only their embedded DWG preview data.
2026-07-29 01:09:13 +03:00
Hakan Seven
d77eb8f419 fix(block): open nested editor tabs
Closes #538
2026-07-28 19:13:27 +03:00
Hakan Seven
05b044f367 perf(scene): make geometry edits incremental
Avoid full document, cache, and GPU rebuilds for entity deltas so add, delete, history, selection, and live polyline edits stay responsive on large drawings.
2026-07-28 17:16:27 +03:00
Hakan Seven
a30f72f627 fix(start): refine responsive page layout 2026-07-28 12:48:39 +03:00
Hakan Seven
2ac61bf99a fix(ui): theme remaining interface text 2026-07-28 12:29:31 +03:00
Hakan Seven
28d8246c68 feat(ui): add discussions and semantic theming
Generate web discussion snapshots in CI; native builds use the public
feed and an offline cache.
2026-07-28 11:49:45 +03:00