Repository navigation
Draw tab: Excel control order, pen labels and pen menus - #1774
Closed
alosslessdev wants to merge 1 commit into
Closed
alosslessdev wants to merge 1 commit into
alosslessdev wants to merge 1 commit into
Conversation
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
crates/ui-egui/src/ribbon.rs): Select (Excel's name for the object tool), Eraser,Pen: Blue,Pen: Black,Pen: RedandHighlighter: 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_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 existingdraw.penparams (color,width). No new commands or engine state.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_colorparses the session's#RRGGBB.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 -- --checkcargo clippy -p gridcraft-ui-egui --all-targets -- -D warningscargo test -p gridcraft-ui-egui(the whole crate's suite)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.mdrevision history updated;contributors/people.tomlcarries my own entry, perAGENTS.md.Branch
draw/excel-draw-tabis cut fromorigin/mainand does not depend on the ribbon-layout branch from #1767.