Merge pull request #4397 from habatake/master

UI Custom Font
This commit is contained in:
DavidXanatos 2024-11-26 18:22:35 +01:00 committed by GitHub
commit ed73a7fb9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -4251,6 +4251,11 @@ void CSandMan::SetUITheme()
QFont font = QApplication::font();
QString customFontStr = theConf->GetString("UIConfig/UIFont", "");
if (customFontStr != "") {
font.setFamily(customFontStr);
QApplication::setFont(font);
}
double newFontSize = m_DefaultFontSize * theConf->GetInt("Options/FontScaling", 100) / 100.0;
if (newFontSize != font.pointSizeF()) {
font.setPointSizeF(newFontSize);