-
Notifications
You must be signed in to change notification settings - Fork 111
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
PaintOnTemplateFeature: Use menu instead of dialog #1710
Conversation
Let the list order represent the layering again. This reverts commit 0e207a7 which was never part of a release.
6249e93
to
c8c78cf
Compare
@lpechacek wrote in #1706 (comment):
|
c8c78cf
to
afa42e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise the change looks good to me. I'll test the new menu ASAP and provide feedback.
* | ||
* The functor captures the provided viewport, and creates icons which | ||
* represent the template area as white rectangle relative to a gray | ||
* rectangle representing the viewport. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comments needs updating or rewording. The template area is now grey on the icon surface if I read the code correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -227,20 +276,26 @@ void PaintOnTemplateFeature::initTemplateListWidget(QListWidget& list_widget) co | |||
|
|||
auto& map = *controller.getMap(); | |||
auto const viewed_rect = viewedRect(); | |||
auto const icon_width = list_widget.style()->pixelMetric(QStyle::PM_SmallIconSize); | |||
auto const make_icon = makeIconBuilder(icon_width, viewed_rect); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest a different variable name. icon_builder = makeIconBuilder(...
would read smoother.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
FTR, the name make_icon
was chosen with regard to the spot where it is used. The other function should have been called makeMakeIcon
:-)
Visualize relative template position.
... for selecting and adding templates.
afa42e0
to
a1349b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested the change on my tablet. Looks pretty good to me and I appreciate the enhancement. Thanks!
... for selecting and templates.
(Split from GH-1706. Needs style udpdates for acceptable usability on Android.)
Template selection moved to scribble mode button (press-and-hold). Only templates in the current viewport, relative position indicated as icon.