VirtualBox

Ticket #16249: vbox_hidpi_support.patch

File vbox_hidpi_support.patch, 1.2 KB (added by Andreas Schneider, 8 years ago)

Enable HiDPI support for the frontent

  • src/VBox/Frontends/VirtualBox/src/main.cpp

    old new extern "C" DECLEXPORT(int) TrustedMain(i  
    446446        qInstallMsgHandler(QtMessageOutput);
    447447#endif /* QT_VERSION < 0x050000 */
    448448
     449#if QT_VERSION >= 0x050600
     450        QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
     451#endif
     452#if QT_VERSION >= 0x050700
     453        QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
     454#endif
    449455        /* Create application: */
    450456        QApplication a(argc, argv);
    451457
    int main(int argc, char **argv, char **e  
    603609    /* Initialization failed: */
    604610    if (RT_FAILURE(rc))
    605611    {
     612#if QT_VERSION >= 0x050600
     613        QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
     614#endif
     615#if QT_VERSION >= 0x050700
     616        QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
     617#endif
    606618        /* We have to create QApplication anyway
    607619         * just to show the only one error-message: */
    608620        QApplication a(argc, &argv[0]);

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy