diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2016-02-22 15:07:21 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2016-02-24 09:06:06 +0000 |
commit | d8e65d5756c937fc3d9be3e5c30b31914a437393 (patch) | |
tree | 8b6e7c7f5d388b32cb54ee69011339decbdc8924 /src/gui/painting/qpagelayout.h | |
parent | 544bbcbcdabdd012cbcce484196053a0b9f37104 (diff) |
Fix font dialog with missing font family and pixel sizes
Two related errors: When a non-existent font was set on
the font dialog, the GTK native font dialog would just pick
a default one. Also, if the font size was specified with
pixel size, we would request -1 as the point size from
Pango.
The fix for both is to resolve the font before applying
it to the font dialog, and set the actually resolved family,
as well as point size. Note that if the point size is
explicitly set, then we pass this to the font dialog,
since the one returned by QFontInfo will always be
calculated based on the (rounded) pixel size, so it will
usually not match the request.
This fixes tst_qfontdialog::setFont().
[ChangeLog][GTK2][Dialogs] Fixed requesting a font from
font dialog with a non-existent family name and/or pixel
size.
Task-number: QTBUG-51148
Change-Id: Id9c783407778546b0cf3f9c3ab19f124e76c878e
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/gui/painting/qpagelayout.h')
0 files changed, 0 insertions, 0 deletions