move "windows:darkmode=1" parameter setting to qt.conf

This commit is contained in:
Garux 2024-01-08 01:02:32 +06:00
parent 20b8bdb5a6
commit b2c1153175
2 changed files with 3 additions and 8 deletions

View File

@ -451,14 +451,7 @@ int main( int argc, char* argv[] ){
#endif
glwidget_setDefaultFormat(); // must go before QApplication instantiation
#ifdef WIN32
std::vector<char*> args( argv, argv + argc );
args.push_back( string_clone( "-platform" ) );
args.push_back( string_clone( "windows:darkmode=1" ) );
args.push_back( nullptr );
argc += 2;
argv = args.data();
#endif
QApplication qapplication( argc, argv );
setlocale( LC_NUMERIC, "C" );
qInstallMessageHandler( qute_messageHandler );

2
setup/data/tools/qt.conf Normal file
View File

@ -0,0 +1,2 @@
[Platforms]
WindowsArguments = darkmode=1