mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-14 00:39:53 -05:00
Increase fixed font point size on Windows
* Consolas runs smaller then the default system font. Increasing by 1 point size makes them look equal.
This commit is contained in:
parent
a7f857d32c
commit
d025f02720
@ -34,13 +34,16 @@ QFont Font::fixedFont()
|
|||||||
auto consolasFont = QFontDatabase().font("Consolas", fixedFont.styleName(), fixedFont.pointSize());
|
auto consolasFont = QFontDatabase().font("Consolas", fixedFont.styleName(), fixedFont.pointSize());
|
||||||
if (consolasFont.family().contains("consolas", Qt::CaseInsensitive)) {
|
if (consolasFont.family().contains("consolas", Qt::CaseInsensitive)) {
|
||||||
fixedFont = consolasFont;
|
fixedFont = consolasFont;
|
||||||
|
// Bump up the font size by one point to match the default font
|
||||||
|
fixedFont.setPointSize(fixedFont.pointSize() + 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
// Qt doesn't choose a monospace font correctly on macOS
|
// Qt doesn't choose a monospace font correctly on macOS
|
||||||
fixedFont = QFontDatabase().font("Menlo", fixedFont.styleName(), fixedFont.pointSize());
|
fixedFont = QFontDatabase().font("Menlo", fixedFont.styleName(), fixedFont.pointSize());
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef Q_OS_WIN
|
||||||
fixedFont.setPointSize(qApp->font().pointSize());
|
fixedFont.setPointSize(qApp->font().pointSize());
|
||||||
|
#endif
|
||||||
return fixedFont;
|
return fixedFont;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user