avoid having empty zones that respond to mouse click
- Group Reviewers
- R255:19257224635a: do not extend mouse areas in header bar longer than the text
mouse areas are not much longer than the text in the header bar
This now works!
However I'm left to wonder why all this rigamarole with TextMetrics is even necessary at all. I notice that if I remove all the TextMetrics components, and let the labels auto-size themselves by removing Layout.fillWidth and Layout.maximumWidth, everything works fine except for the artist label, which gets elided. But I notice that it only gets elided when the point size is set to elisaTheme.defaultFontPointSize * 1.5. If I change the multiplier to 1, 1.4 or 2, it works. However a multiplier of 1.5, 1.75, or any other odd value triggers the bug. This is reproducible for all fonts and sizes that I tried.
I don't understand this bug, but a less invasive workaround might be simply to change the multiplier a bit rather than do all this stuff with TextMetrics.
Thanks a lot for your work. You gave me the idea to have a try at rounding the computed pointSize to an integer. During my tests, this has fixed the bug. Let me know if you have time to test.