Skip to content
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

Make text style for copyright logo consistent between systems #780

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions qgreenland/util/qgis/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def _add_decorations(project: qgc.QgsProject) -> None:
)
project.writeEntry("CopyrightLabel", "/Label", copyright_label)
project.writeEntry("CopyrightLabel", "/Placement", 0)
project.writeEntry("CopyrightLabel", "/MarginH", 0)
project.writeEntry("CopyrightLabel", "/MarginH", 1)
project.writeEntry("CopyrightLabel", "/MarginV", 0)

# Add buffer around copyright text
Expand All @@ -291,7 +291,8 @@ def _add_decorations(project: qgc.QgsProject) -> None:
"CopyrightLabel",
"/Font",
(
'<text-style><text-buffer bufferColor="250,250,250,255"'
'<text-style fontFamily="Open Sans" namedStyle="Regular" fontSize="12">'
'<text-buffer bufferColor="250,250,250,255"'
' bufferJoinStyle="128" bufferSize="1" bufferDraw="1"'
' bufferSizeUnits="MM" bufferOpacity="1" bufferBlendMode="0"'
' bufferSizeMapUnitScale="3x:0,0,0,0,0,0" bufferNoFill="1"/></text-style>'
Expand All @@ -301,8 +302,8 @@ def _add_decorations(project: qgc.QgsProject) -> None:
# Add Image (QGreenland logo):
project.writeEntry("Image", "/Enabled", True)
project.writeEntry("Image", "/Placement", 0)
project.writeEntry("Image", "/MarginH", 4)
project.writeEntry("Image", "/MarginV", 8)
project.writeEntry("Image", "/MarginH", 1)
project.writeEntry("Image", "/MarginV", 12)
Copy link
Author

Choose a reason for hiding this comment

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

With this new text style, the logo needs some adjustment.

project.writeEntry("Image", "/Size", 24)
project.writeEntry("Image", "/ImagePath", "qgreenland.png")

Expand Down