Skip to content

Draft: qt: do not take pixel ratio into consideration when adjusting application scale factor

Fatih Uzunoğlu requested to merge fuzun/vlc:qt/dontscaletwice into master

The application scale factor is used in dp(), which is in most cases if not all used as item size in QML.

Pixels in QML are not device independent, such that Qt applies the device pixel ratio to them. This has some exceptions, notably sourceSize of Image.

Applying device pixel ratio twice would not yield the intended results.

Draft because I'm not exactly sure what are the exact exceptions. Is drag delta device independent? Font pixel size is noted to be device dependent:

Using this function makes the font device dependent. Use pointSize to set the size of the font in a device independent manner.

So, currently it seems that using font.pixelSize is not correct and font.pointSize should have been used because currently application scale factor already considers the pixel ratio.

Request review @chub.

Merge request reports

Loading