Allow to scale GUI on high DPI screens

This commit is contained in:
Klaus Basan
2018-05-24 11:15:54 +02:00
parent 26dcc547e6
commit 86d02716a2
6 changed files with 42 additions and 12 deletions

View File

@@ -30,12 +30,12 @@ using namespace BlackCore::Db;
int main(int argc, char *argv[])
{
//! [SwiftApplicationDemo]
CGuiApplication::highDpiScreenSupport();
CGuiApplication::highDpiScreenSupport(CGuiApplication::parseScaleFactor(argc, argv));
QApplication qa(argc, argv); // needed
Q_UNUSED(qa);
CGuiApplication a(CApplicationInfo::swiftLauncher(), CApplicationInfo::Laucher, CIcons::swiftLauncher1024());
a.addVatlibOptions(); // so it can be passed (hand over) to started applications
a.addParserOption({{"i", "installer"}, QCoreApplication::translate("main", "Installer setup.") });
a.addParserOption({{"i", "installer"}, QCoreApplication::translate("main", "Installer setup.")});
if (!a.parseAndSynchronizeSetup()) { return EXIT_FAILURE; }
a.useWebDataServices(BlackCore::CWebReaderFlags::AllSwiftDbReaders, CDatabaseReaderConfigList::forLauncher());
if (!a.start())