-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Double-clicking a mouse handle for a layout label resizes to fit text #59651
Conversation
@nyalldawson A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged. Please update the description (not the comments) with helpful description and screenshot to help the work from documentors. Thank you! |
This pull request has been tagged for the changelog.
You can edit the description. Format available for credits
Thank you! |
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
That's great! Unfortunately |
…layout item Doing so can cause unintentional moves of the item
This accounts for eg antialiasing based rounding, and avoids us returning a size which is only just exactly enough to fit the text
Double-clicking a handle will auto-size the label to exactly fit the contained text (growing or shrinking as needed). The opposite side of the label will remaining fixed in place, so eg double-click the bottom-right handle causes the bottom-right corner of the label to move.
57241e3
to
9844569
Compare
Have you got some examples I could check that with? I'll address in a follow up PR |
@nyalldawson Any label really. Here is an example project with a single layout that contains 4 labelItems:
I called |
@YoannQDQ Ah, I think that'll be improved by the fix in this pr already |
@YoannQDQ also, good point regarding HTML mode, I hadn't considered that. I've now set it so that no auto-sizing happens if the label is in HTML mode |
@nyalldawson |
Double-clicking a handle will auto-size the label to exactly fit
the contained text (growing or shrinking as needed). The opposite
side of the label will remaining fixed in place, so eg double-click
the bottom-right handle causes the bottom-right corner of the label
to move.