diff options
author | Tor Arne Vestbø <torarnv@gmail.com> | 2019-05-09 20:43:30 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-05-10 17:15:27 +0000 |
commit | 123053bba8dc2241041c31a262420edd3583b1c7 (patch) | |
tree | cd7289e179c1bd911555298b9d2138da27c2b99f /header.GPL | |
parent | b7edc811ec00b6e0687cb96fda64c7e608af56c6 (diff) |
macOS: Don't clip menu item drawing to bounding rect when using CoreText
The bounding rect was computed based on the font metrics HarfBuzz gave
us, but those may not be 1:1 with what CoreText ends up using. When that
happens, drawInRect: will line-break the last word, which makes it fall
completely outside of the single line bounding rect. This is not a good
failure mode, so we prefer to draw the text at a point instead, allowing
the resulting text to draw slightly outside of the bounding rect. This
is preferable to adding a random padding to the width and hoping it will
be enough to solve the problem.
Change-Id: Ifa58a33bd9fad689ed4ee947327b7079f3c1b61d
Fixes: QTBUG-74565
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'header.GPL')
0 files changed, 0 insertions, 0 deletions