Skip to content

Fixes for the layer legend#4484

Open
uclaros wants to merge 7 commits into
masterfrom
fix-legend-size
Open

Fixes for the layer legend#4484
uclaros wants to merge 7 commits into
masterfrom
fix-legend-size

Conversation

@uclaros

@uclaros uclaros commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Adjust the legend text size, color and margins.

Before After
Screenshot_20260429_154531 Screenshot_20260429_154456

@github-actions

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 68031 dmg Expires: 28/07/2026 #6803
linux Build Build failed or not found. #6814
win64 Build 📬 Mergin Maps 59981 win64 Expires: 28/07/2026 #5998
Android Build 📬 Mergin Maps 811511 APK [armeabi-v7a] Expires: 28/07/2026 #8115
📬 Mergin Maps 811511 APK [armeabi-v7a] Google Play Store #8115
Android Build 📬 Mergin Maps 811551 APK [arm64-v8a] Expires: 28/07/2026 #8115
📬 Mergin Maps 811551 APK [arm64-v8a] Google Play Store #8115
iOS Build Build failed or not found. #9054

@uclaros
uclaros marked this pull request as draft April 29, 2026 15:25
@uclaros
uclaros marked this pull request as ready for review May 7, 2026 14:41
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 25502822581

Coverage decreased (-0.07%) to 57.854%

Details

  • Coverage decreased (-0.07%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 49 coverage regressions across 5 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

49 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
mm/app/layer/layerdetaildata.cpp 23 60.38%
mm/core/merginapi.cpp 13 75.07%
mm/core/merginuserauth.cpp 9 68.24%
mm/app/layer/layerdetaillegendimageprovider.cpp 3 81.58%
mm/app/position/providers/simulatedpositionprovider.cpp 1 91.67%

Coverage Stats

Coverage Status
Relevant Lines: 15240
Covered Lines: 8817
Line Coverage: 57.85%
Coverage Strength: 99.68 hits per line

💛 - Coveralls

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 68211 dmg Expires: 05/08/2026 #6821
linux Build 📬 Mergin Maps 68381 x86_64 Expires: 05/08/2026 #6838
win64 Build 📬 Mergin Maps 60141 win64 Expires: 05/08/2026 #6014
Android Build 📬 Mergin Maps 813151 APK [arm64-v8a] Expires: 05/08/2026 #8131
📬 Mergin Maps 813151 APK [arm64-v8a] Google Play Store #8131
Android Build 📬 Mergin Maps 813111 APK [armeabi-v7a] Expires: 05/08/2026 #8131
📬 Mergin Maps 813111 APK [armeabi-v7a] Google Play Store #8131
iOS Build Build failed or not found. #9073

@Withalion Withalion added this to the 2026.4.0 milestone May 22, 2026
@Withalion Withalion modified the milestones: 2026.4.0, 2026.3.1 Jul 15, 2026

@Withalion Withalion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try another rebase :)

Comment thread app/mmstyle.h
double number720() const {return 720 * mDp;}

double scrollVelocityAndroid() const { return 10000; }
static double scrollVelocityAndroid() { return 10'000; }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably a typo

Comment on lines +105 to +111
QgsTextFormat textFormat = legendSettings.rstyle( QgsLegendStyle::Style::SymbolLabel ).textFormat();
textFormat.setSize( 14 ); // 14 is the pixel size of MMStyle::p5, used in form widgets
textFormat.setSizeUnit( Qgis::RenderUnit::Pixels );
textFormat.setColor( MMStyle::nightColor() );
legendSettings.rstyle( QgsLegendStyle::Style::SymbolLabel ).setTextFormat( textFormat );
legendSettings.rstyle( QgsLegendStyle::Style::SymbolLabel ).setMargin( 4 ); // match the top and left total margin of the legend
legendSettings.rstyle( QgsLegendStyle::Style::Title ).setMargin( 0 ); // Our empty Title still adds some margins, so we set those to zero

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like QgsLegendStyle::Style enum doesn't exist anymore in QGIS 3.44 -> QGIS PR


QPainter painter( &legend );
painter.setRenderHint( QPainter::Antialiasing );
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity what's the reason for having this part of the code wrapped in extra curly braces?

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