feat(editor): add arrow styles - #99
Open
jondkinney wants to merge 3 commits into
Open
Conversation
jondkinney
force-pushed
the
feat/arrow-styles
branch
4 times, most recently
from
August 27, 2026 05:03
e361c53 to
c113a80
Compare
jondkinney
force-pushed
the
feat/arrow-styles
branch
from
September 5, 2026 16:46
c113a80 to
4490524
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Arrow bounds and incremental repaint logic can clip or incorrectly display curved arrows, and degenerate controls can remove arrowheads.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds four arrow styles with cycling, restyling, curve editing, persistence, and matching toolbar icons.
Changes:
- Implements Standard, Pointy, Curved, and Double arrow geometry.
- Adds style cycling, bend handles, Shift constraints, and serialization.
- Updates documentation and smoke coverage.
File summaries
| File | Description |
|---|---|
src/capture.hpp |
Defines arrow styles and geometry APIs. |
src/capture.cpp |
Renders, hit-tests, bounds, and serializes arrows. |
src/editor.hpp |
Adds arrow style and control-handle state. |
src/editor.cpp |
Implements arrow editing and style cycling. |
src/icons.cpp |
Renders toolbar icons from arrow geometry. |
tests/editor-smoke.cpp |
Tests rendering, editing, persistence, and shortcuts. |
README.md |
Documents arrow styles and controls. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+943
to
+944
| QRectF arrowVisualBounds(const Annotation &annotation, qreal displayScale) { | ||
| return arrowVisualBoundsInternal(annotation, displayScale); |
Comment on lines
+533
to
+537
| addOpenArrowHead(geometry.stroke, annotation.end, annotation.end - control, | ||
| headSide); | ||
| if (annotation.arrowStyle == ArrowStyle::Double) | ||
| addOpenArrowHead(geometry.stroke, annotation.start, | ||
| annotation.start - control, headSide); |
Comment on lines
+6414
to
+6415
| if (tool_ == Tool::Arrow) | ||
| preview.arrowStyle = arrowStyle_; |
There was a problem hiding this comment.
🟡 Changes recommended
Degenerate arrows incorrectly grow and shift the exported canvas despite rendering no geometry.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Balanced
Comment on lines
+149
to
+150
| if (annotation.kind == Annotation::Kind::Arrow) | ||
| return arrowVisualBounds(annotation).adjusted(-1, -1, 1, 1); |
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.
The arrow tool now includes Standard, Pointy, Curved, and Double styles. Repeatedly pressing
Acycles them, and the toolbar icon mirrors the active arrow geometry.Selected arrows can be restyled the same way. Endpoint edits honor a pre-held
Shiftfor 45° snapping, whileShiftkeeps curved-arrow bends centered.Tested with
make check.