Towards Support of High-Resolution Displays

There is this issue on the tracker for quite some time, namely support for macOS Retina displays. Aside from macOS however, also modern Windows notebooks have very high resolutions, for example like the Asus Zenbook or the Microsoft Surface Pro series.

Jerry is built upon the Qt library, more specifically version 5. Qt added support for such high-res display recently in Qt 5.6. And so I am currently trying to add high-resolution support in Jerry; however unfortunately it’s not a completely trivial task . This is due to mainly two things:

  1. Testing: I have neither a Windows high-resolution display, nor a Retina Macbook. That makes is very difficult to figure out what’s going on and test the result of implementing things. Fortunately, on Window one can at least simulate the effect of a high-resolution Display by simply setting up the DPI rate.
  2. Adding high-resolution support to an application isn’t a matter of just adding some compile option.

Concerning 2: I actually thought it would be that easy. Most graphics in Jerry are vector graphics (i.e. the pieces, the board, etc.), so they should scale without problems. Turns out it isn’t that simple. By compiling with Qt::AA_EnableHighDpiScaling some Qt Widgets are scaled automatically as they should. But custom widgets where I paint manually on (like the actual chessboard) need adjusted coordinate calculations. Also some widgets in dialogs strangely don’t scale automatically, which is more concerning (since this seems to be a bug in Qt 5.5, which means I have to update to a later version).

Here is a quick screenshot on a 1600 * 900 display under Windows 10, with DPI set to 150%.

Unbenannt

 

As you can see (update: or can not see, as the free version of WordPress doesn’t allow high-resolution pictures), the board looks extremely blurry. The icons look blurry, too. The fonts are however scaled properly.

In other words, support is coming, but it will simply take some more time; more than I anticipated.

Advertisements
Towards Support of High-Resolution Displays

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s