feat(ui): unified viewport control chip + per-tile grid rendering

Move grid and grid-snap toggles off the status bar (and its customization
menu) into the top-left viewport chip, now a single container holding the
horizontal/vertical split buttons, render-mode picker, and grid/snap
toggles, sized to the render-mode picker. Add grid + magnet (snap) icons.

Render the grid per model tile from each tile's own grid_on, in its own
bounds and camera, instead of a single grid in the active tile. This stops
the grid flickering on/off as the cursor crosses panes or leaves the
viewport, and lets each pane show its own grid independently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-18 23:29:34 +03:00
1 parent d4a665a34c
commit 9eb805df23
8 files changed
+170 -133

No files matched your search

-8
View File
@@ -12,8 +12,6 @@ use std::path::PathBuf;
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub enum StatusPill {
Coords,
Snap,
Grid,
Ortho,
Lwt,
Polar,
@@ -37,8 +35,6 @@ impl StatusPill {
/// the customization menu.
pub const ALL: &'static [StatusPill] = &[
StatusPill::Coords,
StatusPill::Snap,
StatusPill::Grid,
StatusPill::Ortho,
StatusPill::Lwt,
StatusPill::Polar,
@@ -61,8 +57,6 @@ impl StatusPill {
pub fn id(self) -> &'static str {
match self {
StatusPill::Coords => "coords",
StatusPill::Snap => "snap",
StatusPill::Grid => "grid",
StatusPill::Ortho => "ortho",
StatusPill::Lwt => "lwt",
StatusPill::Polar => "polar",
@@ -86,8 +80,6 @@ impl StatusPill {
pub fn label(self) -> &'static str {
match self {
StatusPill::Coords => "Coordinates",
StatusPill::Snap => "Snap Mode",
StatusPill::Grid => "Grid",
StatusPill::Ortho => "Ortho Mode",
StatusPill::Lwt => "Show Lineweight",
StatusPill::Polar => "Polar Tracking",