Fixes for the layer legend#4484
Conversation
📦 Build Artifacts Ready
|
Coverage Report for CI Build 29741196624Warning No base build found for commit Coverage: 59.078%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
📦 Build Artifacts Ready
|
Withalion
left a comment
There was a problem hiding this comment.
Let's try another rebase :)
| double number720() const {return 720 * mDp;} | ||
|
|
||
| double scrollVelocityAndroid() const { return 10000; } | ||
| static double scrollVelocityAndroid() { return 10'000; } |
There was a problem hiding this comment.
this is probably a typo
There was a problem hiding this comment.
Not a typo, single quotes can be used as visual separators between digits since c++14.
For some reason I can't instantly recognize how many zeros are in10000, but by using thousands' separators I can instantly say 10'000 is 10k.
There was a problem hiding this comment.
Ahh okay, I didn't know that neat
|
|
||
| QPainter painter( &legend ); | ||
| painter.setRenderHint( QPainter::Antialiasing ); | ||
| { |
There was a problem hiding this comment.
out of curiosity what's the reason for having this part of the code wrapped in extra curly braces?
There was a problem hiding this comment.
This is to limit the scope of the QPainter. By making it go out of scope, the painting is finalized and not affected by setting the dpr.
There's a relevant comment:
// Tag with DPR only after painting so QPainter does not auto-scale the
// coordinate system by dpr (which would otherwise double-apply the factor).
legend.setDevicePixelRatio( dpr );
📦 Build Artifacts Ready
|
Adjust the legend text size, color and margins.