Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Eyedropper #948

Merged
merged 5 commits into from
Jan 30, 2024
Merged

Enhancement: Eyedropper #948

merged 5 commits into from
Jan 30, 2024

Conversation

olekhshch
Copy link
Contributor

PR description

More intuitive Eyedropper tool:

-- Tool can have one of 2 states - empty (no style is picked, click on an element picks its style) and where style was picked (click on an element applies a picked style on it). By default once the tool is chosen it has an empty state, if some elements are selected by that time it picks the first selected element's style (same as before);

-- The helper near the cursor was added to help differentiate between 2 states - it doesn't appear if the state is empty and, once some style was picked, it appears as a small div styled according to a picked style

-- Esc resets picked style (if the state is non-empty) or sets Select mode (if the state is empty).

eyedropper_demo.mp4

-- Shortcut changed to Ctrl + I since I is reserved for Italic text

-- Fixed a bug where an element with a dashed stroke doesn't inherit style with the solid stroke. To reproduce:

  1. Set dash-array style as solid
  2. Create an element (e.g. Ellipse) with a solid stroke
  3. Create a second element (e.g. Rectangle) and apply any dashed stroke style to it
  4. Select an element with a solid stroke only (so its style will be picked by the old eyedropper)
  5. Click the Eyedropper tool and try to apply the picked style (with a solid stroke) to the second element (with a dashed stroke) - the second element will inherit the picked style but the stroke will remain dashed

@jfhenon jfhenon merged commit 77b7bd9 into SVG-Edit:master Jan 30, 2024
5 checks passed
@jfhenon
Copy link
Collaborator

jfhenon commented Jan 30, 2024

👍

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.

2 participants