-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
Restructure html label section and add word-spacing #9249
base: master
Are you sure you want to change the base?
Conversation
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.
Good idea for the dedicated section @folinimarc
…nto support_word_spacing_in_html
…ples of HTML tags.
@DelazJ Re-requesting review. I added your suggestions and while doing so streamlined the html and css sections a little more. |
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 a question and a formatting suggestion
With :guilabel:`Allow HTML Formatting` enabled, you need to provide the HTML code in the :guilabel:`Value` field. | ||
Use whitespaces instead of tabs for any kind of indentation. | ||
The expression is parsed and any supported HTML tag overrides its corresponding setting in the labels properties. | ||
An exhaustive list of the supported subset of HTML tags and CSS properties can be found `here <https://doc.qt.io/qt-5/richtext-html-subset.html>`_. |
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.
@folinimarc Maybe do I misunderstand or nitpick but we do not yet support all these tags/properties, do we? They are more like targets afaict, "to be supported".
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.
Correct, we only support a small subset of them:
- font colour
- font size
- font family
- bold
- italic
- strike through
- underline/overline
- super/subscript
- br
- div
- p
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.
Thank you both for bringing this up and the clarification! I should have seen this myself in the source code (or just stick to the scope of the change >.<). Will update the PR next week as soon as I am back at my laptop.
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.
@folinimarc it might worth waiting till qgis/QGIS#58716 is merged, since that also relates
:ref:`textual properties <text_format>` of the label. | ||
Likewise, you can create/overwrite a text format from there. | ||
CSS properties can be set on HTML tags with the style attribute. | ||
The HTML tag span does not apply any formatting to text by itself and is ideal if you just want to apply CSS styling. |
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 HTML tag span does not apply any formatting to text by itself and is ideal if you just want to apply CSS styling. | |
The HTML tag ``span`` does not apply any formatting to text by itself and is ideal if you just want to apply CSS styling. |
Any news @folinimarc ? |
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has had no activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check - that all comments by reviewers have been addressed - that there is enough information for reviewers, in particular
|
Fixes #9245
This PR proposes the following changes:
Discussed with @selmaVH1 at Hackfest, thanks Selma!