diff --git a/app/layer/layerdetaildata.cpp b/app/layer/layerdetaildata.cpp index 8f5793de0..b9c1843d0 100644 --- a/app/layer/layerdetaildata.cpp +++ b/app/layer/layerdetaildata.cpp @@ -13,6 +13,8 @@ #include "qgslegendsettings.h" #include "qgslayertreemodel.h" +#include "mmstyle.h" + LayerDetailData::LayerDetailData( QObject *parent ) : QObject{parent} { @@ -100,6 +102,14 @@ void LayerDetailData::setLayerTreeNode( QgsLayerTreeNode *newLayerTreeNode ) // setup render context for legend QgsLegendSettings legendSettings; + 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 + mLayerTreeNode->setCustomProperty( QStringLiteral( "legend/title-style" ), QStringLiteral( "hidden" ) ); QgsLayerTree *tree = new QgsLayerTree(); diff --git a/app/layer/layerdetaillegendimageprovider.cpp b/app/layer/layerdetaillegendimageprovider.cpp index 708c5f814..14b57adff 100644 --- a/app/layer/layerdetaillegendimageprovider.cpp +++ b/app/layer/layerdetaillegendimageprovider.cpp @@ -47,31 +47,36 @@ QImage LayerDetailLegendImageProvider::requestImage( const QString &, QSize *siz // it by dpr. QScreen *screen = QGuiApplication::screens().at( 0 ); - qreal pdpi = screen->physicalDotsPerInch() * screen->devicePixelRatio(); - qreal dpm = pdpi / 25.4; + const qreal ldpi = screen->logicalDotsPerInch(); + const qreal dpr = screen->devicePixelRatio(); - QSize desiredSize( requestedSize ); - if ( desiredSize.isEmpty() ) - { - // fallback size - desiredSize = QSize( 60, 60 ); - } + const qreal dpmm = ldpi * dpr / 25.4; + + // 60 is fallback size, not sure how it came to be + const int width = requestedSize.isEmpty() ? static_cast( 60 * dpr ) : static_cast( requestedSize.width() * dpr ); + const int height = static_cast( minimumSize.height() * dpmm ); - QImage legend = QImage( desiredSize.width(), minimumSize.height() * dpm, QImage::Format_ARGB32_Premultiplied ); + QImage legend = QImage( width, height, QImage::Format_ARGB32_Premultiplied ); - QPainter painter( &legend ); - painter.setRenderHint( QPainter::Antialiasing ); + { + QPainter painter( &legend ); + painter.setRenderHint( QPainter::Antialiasing ); + + QgsRenderContext context = QgsRenderContext::fromQPainter( &painter ); - QgsRenderContext context = QgsRenderContext::fromQPainter( &painter ); + painter.scale( dpmm, dpmm ); - painter.scale( dpm, dpm ); + legend.fill( Qt::transparent ); - legend.fill( Qt::transparent ); + renderer->drawLegend( context ); + } - renderer->drawLegend( context ); + // 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 ); - size->setHeight( desiredSize.height() ); - size->setWidth( desiredSize.width() ); + size->setWidth( static_cast( width / dpr ) ); + size->setHeight( static_cast( height / dpr ) ); return legend; } diff --git a/app/mmstyle.h b/app/mmstyle.h index 3d57fb2f4..1132271db 100644 --- a/app/mmstyle.h +++ b/app/mmstyle.h @@ -361,150 +361,150 @@ class MMStyle: public QObject QFont p6() const {return fontFactory( 12, false );} QFont p7() const {return fontFactory( 10, false );} - QColor grassColor() const {return QColor::fromString( "#73D19C" );} - QColor forestColor() const {return QColor::fromString( "#004C45" );} - QColor nightColor() const {return QColor::fromString( "#12181F" );} - QColor polarColor() const {return QColor::fromString( "#FFFFFF" );} - QColor transparentColor() const {return QColor::fromString( "transparent" );} - - QColor lightGreenColor() const {return QColor::fromString( "#EFF5F3" );} - QColor mediumGreenColor() const {return QColor::fromString( "#B7CDC4" );} - QColor darkGreenColor() const {return QColor::fromString( "#6E9991" );} - QColor greyColor() const {return QColor::fromString( "#E2E2E2" );} - QColor darkGreyColor() const {return QColor::fromString( "#41464C" );} - QColor mediumGreyColor() const {return QColor::fromString( "#A0A3A5" );} - - QColor sandColor() const {return QColor::fromString( "#FFF4E2" );} - QColor sunsetColor() const {return QColor::fromString( "#FFB673" );} - QColor sunColor() const {return QColor::fromString( "#F4CB46" );} - QColor earthColor() const {return QColor::fromString( "#4D2A24" );} - QColor roseColor() const {return QColor::fromString( "#FFBABC" );} - QColor skyColor() const {return QColor::fromString( "#A6CBF4" );} - QColor grapeColor() const {return QColor::fromString( "#5A2740" );} - QColor grapeTransparentColor() const {return QColor( 0x5A, 0x27, 0x40, 102 );} - QColor deepOceanColor() const {return QColor::fromString( "#1C324A" );} - QColor purpleColor() const {return QColor::fromString( "#CCBDF5" );} - QColor fieldColor() const {return QColor::fromString( "#9BD1A9" );} - - QColor positiveColor() const {return QColor::fromString( "#C0EBCF" );} - QColor warningColor() const {return QColor::fromString( "#F7DDAF" );} - QColor negativeColor() const {return QColor::fromString( "#F0C4BC" );} - QColor negativeLightColor() const {return QColor::fromString( "#FFF0ED" );} - QColor negativeUltraLightColor() const {return QColor::fromString( "#FEFAF9" );} - QColor informativeColor() const {return QColor::fromString( "#BEDAF0" );} - QColor snappingColor() const {return QColor::fromString( "#BD74FF" );} - - QColor photoSketchingBlackColor() const {return QColor::fromString( "#12181F" );} - QColor photoSketchingWhiteColor() const {return QColor::fromString( "#FFFFFF" );} - QColor photoSketchingGreenColor() const {return QColor::fromString( "#57B46F" );} - QColor photoSketchingYellowColor() const {return QColor::fromString( "#FDCB2A" );} - QColor photoSketchingOrangeColor() const {return QColor::fromString( "#FF9C40" );} - QColor photoSketchingBlueColor() const {return QColor::fromString( "#5E9EE4" );} - QColor photoSketchingPinkColor() const {return QColor::fromString( "#FF8F93" );} - - QColor shadowColor() const {return QColor::fromString( "#4D000000" );} - - QUrl splitGeometryIcon() const {return QUrl( "qrc:/SplitGeometry.svg" );} - QUrl streamingIcon() const {return QUrl( "qrc:/Streaming.svg" );} - QUrl redrawGeometryIcon() const {return QUrl( "qrc:/RedrawGeometry.svg" );} - QUrl cloudIcon() const {return QUrl( "qrc:/Cloud.svg" );} - QUrl linkIcon() const {return QUrl( "qrc:/Link.svg" );} - QUrl closeAccountIcon() const {return QUrl( "qrc:/CloseAccount.svg" );} - QUrl signOutIcon() const {return QUrl( "qrc:/SignOut.svg" );} - QUrl workspacesIcon() const {return QUrl( "qrc:/Workspaces.svg" );} - QUrl addIcon() const {return QUrl( "qrc:/Add.svg" );} - QUrl layersIcon() const {return QUrl( "qrc:/Layers.svg" );} - QUrl localChangesIcon() const {return QUrl( "qrc:/LocalChanges.svg" );} - QUrl mapThemesIcon() const {return QUrl( "qrc:/MapThemes.svg" );} - QUrl positionTrackingIcon() const {return QUrl( "qrc:/PositionTracking.svg" );} - QUrl settingsIcon() const {return QUrl( "qrc:/Settings.svg" );} - QUrl zoomToProjectIcon() const {return QUrl( "qrc:/ZoomToProject.svg" );} - QUrl addImageIcon() const {return QUrl( "qrc:/AddImage.svg" );} - QUrl archaeologyIcon() const {return QUrl( "qrc:/Archaeology.svg" );} - QUrl arrowDownIcon() const {return QUrl( "qrc:/ArrowDown.svg" );} - QUrl arrowLinkRightIcon() const {return QUrl( "qrc:/ArrowLinkRight.svg" );} - QUrl arrowUpIcon() const {return QUrl( "qrc:/ArrowUp.svg" );} - QUrl backIcon() const {return QUrl( "qrc:/Back.svg" );} - QUrl briefcaseIcon() const {return QUrl( "qrc:/Briefcase.svg" );} - QUrl calendarIcon() const {return QUrl( "qrc:/Calendar.svg" );} - QUrl checkmarkIcon() const {return QUrl( "qrc:/Checkmark.svg" );} - QUrl closeIcon() const {return QUrl( "qrc:/Close.svg" );} - QUrl deleteIcon() const {return QUrl( "qrc:/Delete.svg" );} - QUrl featuresIcon() const {return QUrl( "qrc:/Features.svg" );} - QUrl filterIcon() const {return QUrl( "qrc:/Filter.svg" );} - QUrl downloadIcon() const {return QUrl( "qrc:/Download.svg" );} - QUrl uploadIcon() const {return QUrl( "qrc:/Upload.svg" );} - QUrl editIcon() const {return QUrl( "qrc:/Edit.svg" );} - QUrl eraserIcon() const {return QUrl( "qrc:/Eraser.svg" );} - QUrl electricityIcon() const {return QUrl( "qrc:/Electricity.svg" );} - QUrl engineeringIcon() const {return QUrl( "qrc:/Engineering.svg" );} - QUrl environmentalIcon() const {return QUrl( "qrc:/Environmental.svg" );} - QUrl facebookIcon() const {return QUrl( "qrc:/Facebook.svg" );} - QUrl globeIcon() const {return QUrl( "qrc:/Globe.svg" );} - QUrl globalIcon() const {return QUrl( "qrc:/Global.svg" );} - QUrl gpsIcon() const {return QUrl( "qrc:/GPSIcon.svg" );} - QUrl gpsAntennaHeightIcon() const {return QUrl( "qrc:/GPSAntennaHeight.svg" );} - QUrl hideIcon() const {return QUrl( "qrc:/Hide.svg" );} - QUrl homeIcon() const {return QUrl( "qrc:/Home.svg" );} - QUrl infoIcon() const {return QUrl( "qrc:/Info.svg" );} - QUrl linkedinIcon() const {return QUrl( "qrc:/Linkedin.svg" );} - QUrl mastodonIcon() const {return QUrl( "qrc:/Mastodon.svg" );} - QUrl minusIcon() const {return QUrl( "qrc:/Minus.svg" );} - QUrl moreIcon() const {return QUrl( "qrc:/More.svg" );} - QUrl moreVerticalIcon() const {return QUrl( "qrc:/MoreVertical.svg" );} - QUrl morePhotosIcon() const {return QUrl( "qrc:/MorePhotos.svg" );} - QUrl remoteImageLoadErrorIcon() const {return QUrl( "qrc:/RemoteImageLoadError.svg" );} - QUrl mouthIcon() const {return QUrl( "qrc:/Mouth.svg" );} - QUrl measurementToolIcon() const {return QUrl( "qrc:/Measure.svg" );} - QUrl closeShapeIcon() const {return QUrl( "qrc:/CloseShape.svg" );} - QUrl naturalResourcesIcon() const {return QUrl( "qrc:/NaturalResources.svg" );} - QUrl nextIcon() const {return QUrl( "qrc:/Next.svg" );} - QUrl otherIcon() const {return QUrl( "qrc:/Other.svg" );} - QUrl othersIcon() const {return QUrl( "qrc:/Others.svg" );} - QUrl plusIcon() const {return QUrl( "qrc:/Plus.svg" );} - QUrl personalIcon() const {return QUrl( "qrc:/Personal.svg" );} - QUrl projectsIcon() const {return QUrl( "qrc:/Projects.svg" );} - QUrl qgisIcon() const {return QUrl( "qrc:/QGIS.svg" );} - QUrl qrCodeIcon() const {return QUrl( "qrc:/QRCode.svg" );} - QUrl redoIcon() const {return QUrl( "qrc:/Redo.svg" );} - QUrl redditIcon() const {return QUrl( "qrc:/Reddit.svg" );} - QUrl satelliteIcon() const {return QUrl( "qrc:/GPSSatellite.svg" );} - QUrl searchIcon() const {return QUrl( "qrc:/Search.svg" );} - QUrl showIcon() const {return QUrl( "qrc:/Show.svg" );} - QUrl smallCheckmarkIcon() const {return QUrl( "qrc:/SmallCheckmark.svg" );} - QUrl smallEditIcon() const {return QUrl( "qrc:/SmallEdit.svg" );} - QUrl socialMediaIcon() const {return QUrl( "qrc:/SocialMedia.svg" );} - QUrl stakeOutIcon() const {return QUrl( "qrc:/StakeOut.svg" );} - QUrl stateAndLocalIcon() const {return QUrl( "qrc:/StateAndLocal.svg" );} - QUrl stopIcon() const {return QUrl( "qrc:/Stop.svg" );} - QUrl subscriptionsIcon() const {return QUrl( "qrc:/Subscriptions.svg" );} - QUrl syncIcon() const {return QUrl( "qrc:/Sync.svg" );} - QUrl syncGreenIcon() const {return QUrl( "qrc:/SyncGreen.svg" );} - QUrl teacherIcon() const {return QUrl( "qrc:/Teacher.svg" );} - QUrl telecommunicationIcon() const {return QUrl( "qrc:/Telecommunication.svg" );} - QUrl termsIcon() const {return QUrl( "qrc:/Terms.svg" );} - QUrl tractorIcon() const {return QUrl( "qrc:/Tractor.svg" );} - QUrl transportationIcon() const {return QUrl( "qrc:/Transportation.svg" );} - QUrl undoIcon() const {return QUrl( "qrc:/Undo.svg" );} - QUrl waitingIcon() const {return QUrl( "qrc:/Waiting.svg" );} - QUrl waterResourcesIcon() const {return QUrl( "qrc:/WaterResources.svg" );} - QUrl studentIcon() const {return QUrl( "qrc:/Student.svg" );} - QUrl xTwitterIcon() const {return QUrl( "qrc:/XTwitter.svg" );} - QUrl youtubeIcon() const {return QUrl( "qrc:/Youtube.svg" );} - QUrl formIcon() const {return QUrl( "qrc:/Terms.svg" );} - QUrl drawIcon() const {return QUrl( "qrc:/Draw.svg" );} - - QUrl projectsFilledIcon() const {return QUrl( "qrc:/ProjectsFilled.svg" );} - QUrl globalFilledIcon() const {return QUrl( "qrc:/GlobalFilled.svg" );} - QUrl infoFilledIcon() const {return QUrl( "qrc:/InfoFilled.svg" );} - QUrl featuresFilledIcon() const {return QUrl( "qrc:/FeaturesFilled.svg" );} - QUrl homeFilledIcon() const {return QUrl( "qrc:/HomeFilled.svg" );} - - QUrl xMarkCircleIcon() const {return QUrl( "qrc:/XMarkCircle.svg" );} - QUrl doneCircleIcon() const {return QUrl( "qrc:/DoneCircle.svg" );} - QUrl errorCircleIcon() const {return QUrl( "qrc:/ErrorCircle.svg" );} - QUrl warningCircleIcon() const {return QUrl( "qrc:/WarningCircle.svg" );} - QUrl editCircleIcon() const {return QUrl( "qrc:/EditCircle.svg" );} + static QColor grassColor() {return QColor::fromString( "#73D19C" );} + static QColor forestColor() {return QColor::fromString( "#004C45" );} + static QColor nightColor() {return QColor::fromString( "#12181F" );} + static QColor polarColor() {return QColor::fromString( "#FFFFFF" );} + static QColor transparentColor() {return QColor::fromString( "transparent" );} + + static QColor lightGreenColor() {return QColor::fromString( "#EFF5F3" );} + static QColor mediumGreenColor() {return QColor::fromString( "#B7CDC4" );} + static QColor darkGreenColor() {return QColor::fromString( "#6E9991" );} + static QColor greyColor() {return QColor::fromString( "#E2E2E2" );} + static QColor darkGreyColor() {return QColor::fromString( "#41464C" );} + static QColor mediumGreyColor() {return QColor::fromString( "#A0A3A5" );} + + static QColor sandColor() {return QColor::fromString( "#FFF4E2" );} + static QColor sunsetColor() {return QColor::fromString( "#FFB673" );} + static QColor sunColor() {return QColor::fromString( "#F4CB46" );} + static QColor earthColor() {return QColor::fromString( "#4D2A24" );} + static QColor roseColor() {return QColor::fromString( "#FFBABC" );} + static QColor skyColor() {return QColor::fromString( "#A6CBF4" );} + static QColor grapeColor() {return QColor::fromString( "#5A2740" );} + static QColor grapeTransparentColor() {return QColor( 0x5A, 0x27, 0x40, 102 );} + static QColor deepOceanColor() {return QColor::fromString( "#1C324A" );} + static QColor purpleColor() {return QColor::fromString( "#CCBDF5" );} + static QColor fieldColor() {return QColor::fromString( "#9BD1A9" );} + + static QColor positiveColor() {return QColor::fromString( "#C0EBCF" );} + static QColor warningColor() {return QColor::fromString( "#F7DDAF" );} + static QColor negativeColor() {return QColor::fromString( "#F0C4BC" );} + static QColor negativeLightColor() {return QColor::fromString( "#FFF0ED" );} + static QColor negativeUltraLightColor() {return QColor::fromString( "#FEFAF9" );} + static QColor informativeColor() {return QColor::fromString( "#BEDAF0" );} + static QColor snappingColor() {return QColor::fromString( "#BD74FF" );} + + static QColor photoSketchingBlackColor() {return QColor::fromString( "#12181F" );} + static QColor photoSketchingWhiteColor() {return QColor::fromString( "#FFFFFF" );} + static QColor photoSketchingGreenColor() {return QColor::fromString( "#57B46F" );} + static QColor photoSketchingYellowColor() {return QColor::fromString( "#FDCB2A" );} + static QColor photoSketchingOrangeColor() {return QColor::fromString( "#FF9C40" );} + static QColor photoSketchingBlueColor() {return QColor::fromString( "#5E9EE4" );} + static QColor photoSketchingPinkColor() {return QColor::fromString( "#FF8F93" );} + + static QColor shadowColor() {return QColor::fromString( "#4D000000" );} + + static QUrl splitGeometryIcon() {return QUrl( "qrc:/SplitGeometry.svg" );} + static QUrl streamingIcon() {return QUrl( "qrc:/Streaming.svg" );} + static QUrl redrawGeometryIcon() {return QUrl( "qrc:/RedrawGeometry.svg" );} + static QUrl cloudIcon() {return QUrl( "qrc:/Cloud.svg" );} + static QUrl linkIcon() {return QUrl( "qrc:/Link.svg" );} + static QUrl closeAccountIcon() {return QUrl( "qrc:/CloseAccount.svg" );} + static QUrl signOutIcon() {return QUrl( "qrc:/SignOut.svg" );} + static QUrl workspacesIcon() {return QUrl( "qrc:/Workspaces.svg" );} + static QUrl addIcon() {return QUrl( "qrc:/Add.svg" );} + static QUrl layersIcon() {return QUrl( "qrc:/Layers.svg" );} + static QUrl localChangesIcon() {return QUrl( "qrc:/LocalChanges.svg" );} + static QUrl mapThemesIcon() {return QUrl( "qrc:/MapThemes.svg" );} + static QUrl positionTrackingIcon() {return QUrl( "qrc:/PositionTracking.svg" );} + static QUrl settingsIcon() {return QUrl( "qrc:/Settings.svg" );} + static QUrl zoomToProjectIcon() {return QUrl( "qrc:/ZoomToProject.svg" );} + static QUrl addImageIcon() {return QUrl( "qrc:/AddImage.svg" );} + static QUrl archaeologyIcon() {return QUrl( "qrc:/Archaeology.svg" );} + static QUrl arrowDownIcon() {return QUrl( "qrc:/ArrowDown.svg" );} + static QUrl arrowLinkRightIcon() {return QUrl( "qrc:/ArrowLinkRight.svg" );} + static QUrl arrowUpIcon() {return QUrl( "qrc:/ArrowUp.svg" );} + static QUrl backIcon() {return QUrl( "qrc:/Back.svg" );} + static QUrl briefcaseIcon() {return QUrl( "qrc:/Briefcase.svg" );} + static QUrl calendarIcon() {return QUrl( "qrc:/Calendar.svg" );} + static QUrl checkmarkIcon() {return QUrl( "qrc:/Checkmark.svg" );} + static QUrl closeIcon() {return QUrl( "qrc:/Close.svg" );} + static QUrl deleteIcon() {return QUrl( "qrc:/Delete.svg" );} + static QUrl featuresIcon() {return QUrl( "qrc:/Features.svg" );} + static QUrl filterIcon() {return QUrl( "qrc:/Filter.svg" );} + static QUrl downloadIcon() {return QUrl( "qrc:/Download.svg" );} + static QUrl uploadIcon() {return QUrl( "qrc:/Upload.svg" );} + static QUrl editIcon() {return QUrl( "qrc:/Edit.svg" );} + static QUrl eraserIcon() {return QUrl( "qrc:/Eraser.svg" );} + static QUrl electricityIcon() {return QUrl( "qrc:/Electricity.svg" );} + static QUrl engineeringIcon() {return QUrl( "qrc:/Engineering.svg" );} + static QUrl environmentalIcon() {return QUrl( "qrc:/Environmental.svg" );} + static QUrl facebookIcon() {return QUrl( "qrc:/Facebook.svg" );} + static QUrl globeIcon() {return QUrl( "qrc:/Globe.svg" );} + static QUrl globalIcon() {return QUrl( "qrc:/Global.svg" );} + static QUrl gpsIcon() {return QUrl( "qrc:/GPSIcon.svg" );} + static QUrl gpsAntennaHeightIcon() {return QUrl( "qrc:/GPSAntennaHeight.svg" );} + static QUrl hideIcon() {return QUrl( "qrc:/Hide.svg" );} + static QUrl homeIcon() {return QUrl( "qrc:/Home.svg" );} + static QUrl infoIcon() {return QUrl( "qrc:/Info.svg" );} + static QUrl linkedinIcon() {return QUrl( "qrc:/Linkedin.svg" );} + static QUrl mastodonIcon() {return QUrl( "qrc:/Mastodon.svg" );} + static QUrl minusIcon() {return QUrl( "qrc:/Minus.svg" );} + static QUrl moreIcon() {return QUrl( "qrc:/More.svg" );} + static QUrl moreVerticalIcon() {return QUrl( "qrc:/MoreVertical.svg" );} + static QUrl morePhotosIcon() {return QUrl( "qrc:/MorePhotos.svg" );} + static QUrl remoteImageLoadErrorIcon() {return QUrl( "qrc:/RemoteImageLoadError.svg" );} + static QUrl mouthIcon() {return QUrl( "qrc:/Mouth.svg" );} + static QUrl measurementToolIcon() {return QUrl( "qrc:/Measure.svg" );} + static QUrl closeShapeIcon() {return QUrl( "qrc:/CloseShape.svg" );} + static QUrl naturalResourcesIcon() {return QUrl( "qrc:/NaturalResources.svg" );} + static QUrl nextIcon() {return QUrl( "qrc:/Next.svg" );} + static QUrl otherIcon() {return QUrl( "qrc:/Other.svg" );} + static QUrl othersIcon() {return QUrl( "qrc:/Others.svg" );} + static QUrl plusIcon() {return QUrl( "qrc:/Plus.svg" );} + static QUrl personalIcon() {return QUrl( "qrc:/Personal.svg" );} + static QUrl projectsIcon() {return QUrl( "qrc:/Projects.svg" );} + static QUrl qgisIcon() {return QUrl( "qrc:/QGIS.svg" );} + static QUrl qrCodeIcon() {return QUrl( "qrc:/QRCode.svg" );} + static QUrl redoIcon() {return QUrl( "qrc:/Redo.svg" );} + static QUrl redditIcon() {return QUrl( "qrc:/Reddit.svg" );} + static QUrl satelliteIcon() {return QUrl( "qrc:/GPSSatellite.svg" );} + static QUrl searchIcon() {return QUrl( "qrc:/Search.svg" );} + static QUrl showIcon() {return QUrl( "qrc:/Show.svg" );} + static QUrl smallCheckmarkIcon() {return QUrl( "qrc:/SmallCheckmark.svg" );} + static QUrl smallEditIcon() {return QUrl( "qrc:/SmallEdit.svg" );} + static QUrl socialMediaIcon() {return QUrl( "qrc:/SocialMedia.svg" );} + static QUrl stakeOutIcon() {return QUrl( "qrc:/StakeOut.svg" );} + static QUrl stateAndLocalIcon() {return QUrl( "qrc:/StateAndLocal.svg" );} + static QUrl stopIcon() {return QUrl( "qrc:/Stop.svg" );} + static QUrl subscriptionsIcon() {return QUrl( "qrc:/Subscriptions.svg" );} + static QUrl syncIcon() {return QUrl( "qrc:/Sync.svg" );} + static QUrl syncGreenIcon() {return QUrl( "qrc:/SyncGreen.svg" );} + static QUrl teacherIcon() {return QUrl( "qrc:/Teacher.svg" );} + static QUrl telecommunicationIcon() {return QUrl( "qrc:/Telecommunication.svg" );} + static QUrl termsIcon() {return QUrl( "qrc:/Terms.svg" );} + static QUrl tractorIcon() {return QUrl( "qrc:/Tractor.svg" );} + static QUrl transportationIcon() {return QUrl( "qrc:/Transportation.svg" );} + static QUrl undoIcon() {return QUrl( "qrc:/Undo.svg" );} + static QUrl waitingIcon() {return QUrl( "qrc:/Waiting.svg" );} + static QUrl waterResourcesIcon() {return QUrl( "qrc:/WaterResources.svg" );} + static QUrl studentIcon() {return QUrl( "qrc:/Student.svg" );} + static QUrl xTwitterIcon() {return QUrl( "qrc:/XTwitter.svg" );} + static QUrl youtubeIcon() {return QUrl( "qrc:/Youtube.svg" );} + static QUrl formIcon() {return QUrl( "qrc:/Terms.svg" );} + static QUrl drawIcon() {return QUrl( "qrc:/Draw.svg" );} + + static QUrl projectsFilledIcon() {return QUrl( "qrc:/ProjectsFilled.svg" );} + static QUrl globalFilledIcon() {return QUrl( "qrc:/GlobalFilled.svg" );} + static QUrl infoFilledIcon() {return QUrl( "qrc:/InfoFilled.svg" );} + static QUrl featuresFilledIcon() {return QUrl( "qrc:/FeaturesFilled.svg" );} + static QUrl homeFilledIcon() {return QUrl( "qrc:/HomeFilled.svg" );} + + static QUrl xMarkCircleIcon() {return QUrl( "qrc:/XMarkCircle.svg" );} + static QUrl doneCircleIcon() {return QUrl( "qrc:/DoneCircle.svg" );} + static QUrl errorCircleIcon() {return QUrl( "qrc:/ErrorCircle.svg" );} + static QUrl warningCircleIcon() {return QUrl( "qrc:/WarningCircle.svg" );} + static QUrl editCircleIcon() {return QUrl( "qrc:/EditCircle.svg" );} static QUrl lineLayerNoColorOverlayIcon() {return QUrl( "qrc:/mIconLineLayer-nocoloroverlay.svg" );} static QUrl pointLayerNoColorOverlayIcon() {return QUrl( "qrc:/mIconPointLayer-nocoloroverlay.svg" );} @@ -513,45 +513,45 @@ class MMStyle: public QObject static QUrl tableLayerNoColorOverlayIcon() {return QUrl( "qrc:/mIconTableLayer-nocoloroverlay.svg" );} static QUrl followGPSNoColorOverlayIcon() {return QUrl( "qrc:/FollowGPS-nocoloroverlay.svg" );} - QUrl loadingIndicatorImage() const {return QUrl( "qrc:/images/LoadingIndicator.svg" );} - QUrl mmLogoImage() const {return QUrl( "qrc:/images/MMLogo.svg" );} - QUrl lutraLogoImage() const {return QUrl( "qrc:/images/LutraLogo.svg" );} - QUrl trackingDirectionImage() const {return QUrl( "qrc:/images/TrackingDirection.svg" );} - QUrl directionImage() const {return QUrl( "qrc:/images/Direction.svg" );} - QUrl mmSymbolImage() const {return QUrl( "qrc:/images/MMSymbol.svg" );} - QUrl acceptInvitationLogoImage() const {return QUrl( "qrc:/images/AcceptInvitationLogoImage.svg" ); } - QUrl acceptInvitationImage() const {return QUrl( "qrc:/images/AcceptInvitationImage.svg" ); } - QUrl uploadImage() const {return QUrl( "qrc:/images/UploadImage.svg" );} - QUrl noMapThemesImage() const {return QUrl( "qrc:/images/NoMapThemesImage.svg" );} - QUrl syncFailedImage() const {return QUrl( "qrc:/images/SyncFailed.svg" );} - QUrl noPermissionsImage() const {return QUrl( "qrc:/images/NoPermissions.svg" );} - QUrl signInImage() const {return QUrl( "qrc:/images/SignIn.svg" );} - QUrl reachedDataLimitImage() const {return QUrl( "qrc:/images/ReachedDataLimit.svg" );} - QUrl warnLogoImage() const {return QUrl( "qrc:/images/WarnLogoImage.svg" );} - QUrl mapPinImage() const {return QUrl( "qrc:/images/MapPin.svg" );} - QUrl positionTrackingRunningImage() const {return QUrl( "qrc:/images/PositionTrackingRunning.svg" );} - QUrl positionTrackingStartImage() const {return QUrl( "qrc:/images/PositionTrackingStart.svg" );} - QUrl syncImage() const {return QUrl( "qrc:/images/SyncImage.svg" );} - QUrl externalGpsGreenImage() const {return QUrl( "qrc:/images/ExternalGpsGreen.svg" );} - QUrl externalGpsRedImage() const {return QUrl( "qrc:/images/ExternalGpsRed.svg" );} - QUrl negativeMMSymbolImage() const {return QUrl( "qrc:/images/NegativeMMSymbol.svg" );} - QUrl positiveMMSymbolImage() const {return QUrl( "qrc:/images/PositiveMMSymbol.svg" );} - QUrl neutralMMSymbolImage() const {return QUrl( "qrc:/images/NeutralMMSymbol.svg" );} - QUrl closeAccountImage() const {return QUrl( "qrc:/images/CloseAccount.svg" );} - QUrl attentionImage() const {return QUrl( "qrc:/images/Attention.svg" );} - QUrl blueInfoImage() const {return QUrl( "qrc:/images/BlueInfo.svg" );} - QUrl bubbleImage() const {return QUrl( "qrc:/images/Bubble.svg" );} - QUrl streamingBootsImage() const {return QUrl( "qrc:/images/StreamingBoots.svg" );} - QUrl streamingBootsOrangeImage() const {return QUrl( "qrc:/images/StreamingBootsOrange.svg" );} - QUrl noWifiImage() const {return QUrl( "qrc:/images/NoWifi.svg" );} - QUrl crosshairBackgroundImage() const {return QUrl( "qrc:/images/CrosshairBackground.svg" );} - QUrl crosshairCenterImage() const {return QUrl( "qrc:/images/CrosshairCenter.svg" );} - QUrl crosshairCircleImage() const {return QUrl( "qrc:/images/CrosshairCircle.svg" );} - QUrl crosshairForegroundImage() const {return QUrl( "qrc:/images/CrosshairForeground.svg" );} - QUrl crosshairPlusImage() const {return QUrl( "qrc:/images/CrosshairPlus.svg" );} - QUrl noWorkspaceImage() const {return QUrl( "qrc:/images/NoWorkspace.svg" );} - - QUrl hapticSound() {return QUrl( "qrc:/sounds/haptic_sound.wav" );} + static QUrl loadingIndicatorImage() {return QUrl( "qrc:/images/LoadingIndicator.svg" );} + static QUrl mmLogoImage() {return QUrl( "qrc:/images/MMLogo.svg" );} + static QUrl lutraLogoImage() {return QUrl( "qrc:/images/LutraLogo.svg" );} + static QUrl trackingDirectionImage() {return QUrl( "qrc:/images/TrackingDirection.svg" );} + static QUrl directionImage() {return QUrl( "qrc:/images/Direction.svg" );} + static QUrl mmSymbolImage() {return QUrl( "qrc:/images/MMSymbol.svg" );} + static QUrl acceptInvitationLogoImage() {return QUrl( "qrc:/images/AcceptInvitationLogoImage.svg" ); } + static QUrl acceptInvitationImage() {return QUrl( "qrc:/images/AcceptInvitationImage.svg" ); } + static QUrl uploadImage() {return QUrl( "qrc:/images/UploadImage.svg" );} + static QUrl noMapThemesImage() {return QUrl( "qrc:/images/NoMapThemesImage.svg" );} + static QUrl syncFailedImage() {return QUrl( "qrc:/images/SyncFailed.svg" );} + static QUrl noPermissionsImage() {return QUrl( "qrc:/images/NoPermissions.svg" );} + static QUrl signInImage() {return QUrl( "qrc:/images/SignIn.svg" );} + static QUrl reachedDataLimitImage() {return QUrl( "qrc:/images/ReachedDataLimit.svg" );} + static QUrl warnLogoImage() {return QUrl( "qrc:/images/WarnLogoImage.svg" );} + static QUrl mapPinImage() {return QUrl( "qrc:/images/MapPin.svg" );} + static QUrl positionTrackingRunningImage() {return QUrl( "qrc:/images/PositionTrackingRunning.svg" );} + static QUrl positionTrackingStartImage() {return QUrl( "qrc:/images/PositionTrackingStart.svg" );} + static QUrl syncImage() {return QUrl( "qrc:/images/SyncImage.svg" );} + static QUrl externalGpsGreenImage() {return QUrl( "qrc:/images/ExternalGpsGreen.svg" );} + static QUrl externalGpsRedImage() {return QUrl( "qrc:/images/ExternalGpsRed.svg" );} + static QUrl negativeMMSymbolImage() {return QUrl( "qrc:/images/NegativeMMSymbol.svg" );} + static QUrl positiveMMSymbolImage() {return QUrl( "qrc:/images/PositiveMMSymbol.svg" );} + static QUrl neutralMMSymbolImage() {return QUrl( "qrc:/images/NeutralMMSymbol.svg" );} + static QUrl closeAccountImage() {return QUrl( "qrc:/images/CloseAccount.svg" );} + static QUrl attentionImage() {return QUrl( "qrc:/images/Attention.svg" );} + static QUrl blueInfoImage() {return QUrl( "qrc:/images/BlueInfo.svg" );} + static QUrl bubbleImage() {return QUrl( "qrc:/images/Bubble.svg" );} + static QUrl streamingBootsImage() {return QUrl( "qrc:/images/StreamingBoots.svg" );} + static QUrl streamingBootsOrangeImage() {return QUrl( "qrc:/images/StreamingBootsOrange.svg" );} + static QUrl noWifiImage() {return QUrl( "qrc:/images/NoWifi.svg" );} + static QUrl crosshairBackgroundImage() {return QUrl( "qrc:/images/CrosshairBackground.svg" );} + static QUrl crosshairCenterImage() {return QUrl( "qrc:/images/CrosshairCenter.svg" );} + static QUrl crosshairCircleImage() {return QUrl( "qrc:/images/CrosshairCircle.svg" );} + static QUrl crosshairForegroundImage() {return QUrl( "qrc:/images/CrosshairForeground.svg" );} + static QUrl crosshairPlusImage() {return QUrl( "qrc:/images/CrosshairPlus.svg" );} + static QUrl noWorkspaceImage() {return QUrl( "qrc:/images/NoWorkspace.svg" );} + + static QUrl hapticSound() {return QUrl( "qrc:/sounds/haptic_sound.wav" );} double toolbarHeight() const { @@ -732,7 +732,7 @@ class MMStyle: public QObject double number400() const {return 400 * mDp;} double number720() const {return 720 * mDp;} - double scrollVelocityAndroid() const { return 10000; } + static double scrollVelocityAndroid() { return 10'000; } void setSafeAreaTop( double newSafeAreaTop ) {