conftypes: Set pixel size correctly in QtFont.

This commit is contained in:
Florian Bruhin 2014-08-07 07:39:47 +02:00
parent ef603090c8
commit 934aaf80c6

View File

@ -705,7 +705,7 @@ class QtFont(Font):
if size.lower().endswith('pt'):
font.setPointSizeF(float(size[:-2]))
elif size.lower().endswith('px'):
font.setPointSizeF(int(size[:-2]))
font.setPixelSize(int(size[:-2]))
# The Qt CSS parser handles " and ' before passing the string to
# QFont.setFamily. We could do proper CSS-like parsing here, but since
# hopefully nobody will ever have a font with quotes in the family (if