GGD-OpenSpaceNet icon indicating copy to clipboard operation
GGD-OpenSpaceNet copied to clipboard

OSN GUI Doesn't Work Right With Hi-DPI Monitors

Open avitebskiy opened this issue 8 years ago • 4 comments

If the text size is is greater than 100%, the OSN GUI is not rendered correctly:

osn screenshot

The UI must be laid out in resolution and DPI-independent way.

displays screenshot

avitebskiy avatar Feb 21 '17 00:02 avitebskiy

2017-02-21

Also looks similar on Windows with HiDPI displays. Not good.

geovations avatar Feb 21 '17 14:02 geovations

Logging this as a potential solution:


int main(int argc, char *argv[])
{
    QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

    QApplication app(argc, argv);   
    return app.exec();
}

KevinMcGee avatar Feb 22 '17 18:02 KevinMcGee

Related to #152

KevinMcGee avatar Feb 28 '17 14:02 KevinMcGee

Added a.setAttribute(Qt::AA_EnableHighDpiScaling); to address this issue, functionality that was introduced in qt5.6. This function makes Qt scale the main (device independent) coordinate system according to display scale factors provided by the operating system. This needs to be tested on a Hi-DPI monitor before it can be closed

KevinMcGee avatar Apr 11 '17 15:04 KevinMcGee