Okular Annotation: add support for line start style for Straight Line tool
ClosedPublic

Authored by knambiar on May 16 2019, 6:43 AM.

Details

Summary

Similar to the line ending style, add support for line start style for the Straight Line annotation tool

Test Plan
  1. Go to Configure annotations
  2. Create (or edit existing) Straight Line tool
  3. Set the ‘Line Start’ option on Style and Apply
  4. Use the Straight Line tool to draw a line and check the line starting style.

Diff Detail

Repository
R223 Okular
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
knambiar created this revision.May 16 2019, 6:43 AM
Restricted Application added a project: Okular. · View Herald TranscriptMay 16 2019, 6:43 AM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
knambiar requested review of this revision.May 16 2019, 6:43 AM

Thanks, LGTM. If nobody objects I'll accept and land this on master the day after tomorrow.

ui/annotationwidgets.cpp
556

You could say for ( const QString &i: { /* ... */ } ) here? I think auto i adds an unnecessary QString copy constructor call (but negligible because COW and no hot path), and there's no need for auto deduction because the type is simple.

knambiar updated this revision to Diff 58235.May 18 2019, 5:57 AM
knambiar marked an inline comment as done.

Use const QString & instead of auto in range loop

knambiar updated this revision to Diff 58236.May 18 2019, 5:59 AM

Whitespace fix

tobiasdeiminger accepted this revision.May 19 2019, 7:03 AM
This revision is now accepted and ready to land.May 19 2019, 7:03 AM
This revision was automatically updated to reflect the committed changes.

@knambiar The config dialog for polygon annotations has seemingly regressed with recent changes:

Inner color overlaps with Line Start. Would you still be around for a fix?

knambiar added a comment.EditedMay 22 2019, 9:13 AM

@knambiar The config dialog for polygon annotations has seemingly regressed with recent changes:

Ouch. Going to fix it in a new review.

D21332 created.