by
Changes to 2 files · Browse files at 49a1f6f23572 Showing diff from parent e3274375e7be 6536a00ad721 Diff from another changeset...
@@ -528,9 +528,9 @@ except ImportError:
return
- # On Windows, the font for main window seems to be determined by "icon"
- # font, but Qt chooses uncustomizable system font.
- lf = win32gui.SystemParametersInfo(win32con.SPI_GETICONTITLELOGFONT)
+ # use configurable font like GTK, Mozilla XUL or Eclipse SWT
+ ncm = win32gui.SystemParametersInfo(win32con.SPI_GETNONCLIENTMETRICS)
+ lf = ncm['lfMessageFont']
f = QFont(hglib.tounicode(lf.lfFaceName))
f.setItalic(lf.lfItalic)
if lf.lfWeight != win32con.FW_DONTCARE:
@@ -539,7 +539,7 @@ n, w = filter(lambda e: e[0] <= lf.lfWeight, weights)[-1]
f.setWeight(w)
f.setPixelSize(abs(lf.lfHeight))
- QApplication.setFont(f, 'QMainWindow')
+ QApplication.setFont(f, 'QWidget')
class PMButton(QPushButton):
"""Toggle button with plus/minus icon images"""
|
Loading...