Skip to content

Draw tab: Excel control order, pen labels and pen menus - #1774

Closed
alosslessdev wants to merge 1 commit into
storytold:mainfrom
alosslessdev:draw/excel-draw-tab
Closed

alosslessdev wants to merge 1 commit into
storytold:mainfrom
alosslessdev:draw/excel-draw-tab

Conversation

@alosslessdev

Copy link
Copy Markdown
Contributor

Fixes #1773.

The Draw tab now reads like Excel's for the tools GridCraft already has: Select, Eraser, the pen set, then Ink to Shape — with Excel's labels and split pen buttons.

What changed

  • Order and labels (crates/ui-egui/src/ribbon.rs): Select (Excel's name for the object tool), Eraser, Pen: Blue, Pen: Black, Pen: Red and Highlighter: Yellow, each labelled with its colour and current thickness (Pen: Blue, 2 pt) the way Excel labels its pens (Pen: Black, 0.35 mm).
  • Pen split buttons (pen_button): the body selects the pen; the arrow opens a menu with thickness choices (0.5–17 pt) and the colour palette, both wired to the existing draw.pen params (color, width). No new commands or engine state.
  • Live stroke preview (crates/ui-egui/src/grid.rs): the line under the pointer is painted in the selected pen's colour and thickness instead of always blue at 2 pt, so the preview is the ink that will be committed (the highlighter preview is now 12 pt). ink_color parses the session's #RRGGBB.
  • Select icon (crates/ui-egui/src/icons.rs): a code-drawn arrow cursor, since the existing Select button borrowed the Shapes icon. Icons stay GridCraft's own work.

Not included, deliberately:

Verification

  • cargo fmt --all -- --check
  • cargo clippy -p gridcraft-ui-egui --all-targets -- -D warnings
  • cargo test -p gridcraft-ui-egui (the whole crate's suite)
  • Offscreen render: cargo run -p gridcraft-ui-egui --example snapshot -- --sample sales --tab Draw draw-tab.png — Select, Eraser, the four pen buttons with their menus and Ink to Shape sit in Excel's order, and the labels carry colour and thickness.
  • docs/ui-parity.md revision history updated; contributors/people.toml carries my own entry, per AGENTS.md.

Branch draw/excel-draw-tab is cut from origin/main and does not depend on the ribbon-layout branch from #1767.

@alosslessdev

Copy link
Copy Markdown
Contributor Author

Superseded by one PR per feature: #1787 (control order), #1791 (pen labels and representative icons), #1792 (pen split buttons and menus), #1793 (live preview). Closing this combined PR in favour of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Draw tab: Excel's control set, labels and pen menus

1 participant