fix: enable font antialias

fix #315
This commit is contained in:
YiFang Xiao 2023-05-13 13:48:13 +08:00 committed by xiaoyifang
parent 837f8bcaf8
commit 3265912b28

View file

@ -287,12 +287,10 @@ int main( int argc, char ** argv )
{ "gdlookup", "gdau", "gico", "qrcx", "bres", "bword", "gdprg", "gdvideo", "gdpicture", "gdtts", "ifr", "entry" }; { "gdlookup", "gdau", "gico", "qrcx", "bres", "bword", "gdprg", "gdvideo", "gdpicture", "gdtts", "ifr", "entry" };
for ( const auto & localScheme : localSchemes ) { for ( const auto & localScheme : localSchemes ) {
QWebEngineUrlScheme webUiScheme(localScheme.toLatin1()); QWebEngineUrlScheme webUiScheme( localScheme.toLatin1() );
webUiScheme.setFlags(QWebEngineUrlScheme::SecureScheme | webUiScheme.setFlags( QWebEngineUrlScheme::SecureScheme | QWebEngineUrlScheme::LocalScheme
QWebEngineUrlScheme::LocalScheme | | QWebEngineUrlScheme::LocalAccessAllowed | QWebEngineUrlScheme::CorsEnabled );
QWebEngineUrlScheme::LocalAccessAllowed| QWebEngineUrlScheme::registerScheme( webUiScheme );
QWebEngineUrlScheme::CorsEnabled);
QWebEngineUrlScheme::registerScheme(webUiScheme);
} }
QFile file; QFile file;
@ -304,6 +302,9 @@ int main( int argc, char ** argv )
Q_UNUSED( guard ) Q_UNUSED( guard )
QFont f = QApplication::font();
f.setStyleStrategy( QFont::PreferAntialias );
QApplication::setFont( f );
if ( app.isRunning() ) if ( app.isRunning() )
{ {