- enhancement: use "Microsoft Yahei" as the default UI font whe running in Simplified Chinese Windows

This commit is contained in:
Roy Qu 2021-11-30 22:39:24 +08:00
parent ad61e63fec
commit 51b344eb59
2 changed files with 11 additions and 1 deletions

View File

@ -5,6 +5,7 @@ Version 0.10.4 For Dev-C++ 7 Beta
- change: press shift+tab when there are selections will do unindent - change: press shift+tab when there are selections will do unindent
- enhancement: press home will switch between begin of line and the position of fisrt non-space char - enhancement: press home will switch between begin of line and the position of fisrt non-space char
- enhancement: press end will switch between end of line and the position of last non-space char - enhancement: press end will switch between end of line and the position of last non-space char
- enhancement: use "Microsoft Yahei" as the default UI font whe running in Simplified Chinese Windows
Version 0.10.3 For Dev-C++ 7 Beta Version 0.10.3 For Dev-C++ 7 Beta
- enhancement: treat files ended with ".C" or ".CPP" as C++ files - enhancement: treat files ended with ".C" or ".CPP" as C++ files

View File

@ -2708,7 +2708,16 @@ void Settings::Environment::doLoad()
{ {
//Appearence //Appearence
mTheme = stringValue("theme","dark"); mTheme = stringValue("theme","dark");
mInterfaceFont = stringValue("interface font","Segoe UI"); QString defaultFontName = "Segoe UI";
if (QLocale::system().name() == "zh_CN") {
QString fontName;
fontName = "Microsoft Yahei";
QFont font(fontName);
if (font.exactMatch()) {
defaultFontName = fontName;
}
}
mInterfaceFont = stringValue("interface font",defaultFontName);
mInterfaceFontSize = intValue("interface font size",10); mInterfaceFontSize = intValue("interface font size",10);
mLanguage = stringValue("language", QLocale::system().name()); mLanguage = stringValue("language", QLocale::system().name());