[Development] Updated high-DPI support for Qt 5.14

Christoph Cullmann christoph at cullmann.io
Thu Oct 3 14:57:27 CEST 2019


On 2019-10-03 13:42, Morten Sørvig wrote:
>> On 1 Oct 2019, at 23:18, Christoph Cullmann <christoph at cullmann.io> 
>> wrote:
>> 
>> Hi,
>> 
>> actually, unrelated to how one can configure the stuff, at the moment,
>> I see still a lot of Qt internal rendering artifacts for fractional 
>> scaling.
>> 
>> See https://bugreports.qt.io/browse/QTBUG-66036
>> 
>> For some I made now hacky workarounds in KTextEditor, see 
>> https://bugs.kde.org/show_bug.cgi?id=390451
>> 
>> Some still remain for factors like 1.1 and text selections...
>> 
>> And one should think about if it is really a good idea to accept 
>> factors like 1.1
>> and not round them to some at least 1 / 2^x factor that doesn't lead 
>> to interesting
>> accumulating rounding errors. (in addition to the opt-out of 
>> fractional scaling at all)
> 
> I think we can do so, if needed. Which factor, and what is the
> trade-off between a small
> or large factor?

The trade-off would be how much precision you need.

  At the moment, you can scale with e.g. 1.1, that will lead to rounding 
errors even after a few computations as 1.1 is really a bad number to 
represent as float. This will then again lead to small rendering 
glitches.

If we e.g. limit internal the minimal scale quant to something like 1/16 
or 1/32 or similar, we will run for reasonable regions (e.g. all 
applications that just use 32 Bit integer coordinates) in nö real 
rounding errors at all.

See experiments in https://bugs.kde.org/show_bug.cgi?id=412447

Using reasonable factors removes all remaining artifacts (beside the 
fillRect/clipping errors I reported now as extra bugs)

Greetings
Christoph

> 
> Morten
> 
> 
>> 
>> Greetings
>> Christoph
>> 
>> --
>> Ignorance is bliss...
>> https://cullmann.io | https://kate-editor.org
>> _______________________________________________
>> Development mailing list
>> Development at qt-project.org
>> https://lists.qt-project.org/listinfo/development
> 
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development

-- 
Ignorance is bliss...
https://cullmann.io | https://kate-editor.org


More information about the Development mailing list