Bug 358556

Summary: floating point for QT_DEVICE_PIXEL_RATIO
Product: [Plasma] plasmashell Reporter: Alin M Elena <alinm.elena>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED UPSTREAM    
Severity: normal CC: bshah, plasma-bugs-null
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alin M Elena 2016-01-25 20:08:51 UTC
At the moment one can setup the scale for display in sets of 0.1 see Display Configuration -> scale display.

However the /usr/bin/startkde +153 and /usr/bin/startplasmacompositor +104 both set QT_DEVICE_PIXEL_RATIO only for integers. 

both lines shall be changed to
   if test "$kdeglobals_kscreen_scalefactor"  != "1" ; then

also scale display may offer "safe" values for scalling (steps of 0.25)

Alin


Reproducible: Always
Comment 1 David Edmundson 2016-01-26 17:00:46 UTC
Only integers work for that variable. which is why we only set them to integers.
You can try and argue the case with Qt, but a lot of drawing code does go weird with non integer stuff.
Comment 2 Alin M Elena 2016-01-26 17:17:35 UTC
I have no idea what artefacts do you see... 
I used 1.5 on my computer with no issues. 
the same on my phone I used qt5 with non integer pixel ratios without issues.

anyhow changing the start script to allow non-integers does not change with anything the behaviour right now. The users who want to be "safe" can still use integers... the rest can use non-integers. 

Alin
Comment 3 David Edmundson 2016-01-26 17:24:18 UTC
I don't see any artefacts because as I said, it doesn't work with non integers

From Qt5.5
qxcbscreen.cpp:    static bool dpr_scaling_enabled = (qgetenv("QT_DEVICE_PIXEL_RATIO").toInt() > 1


Your phone is maybe wayland?
Comment 4 David Edmundson 2016-01-26 21:06:10 UTC
Did some research, QT_SCALE_FACTOR (the Qt 5.6 one which is renamed) is float based. 

I'll make sure to keep that when I do the port.
Comment 5 David Edmundson 2016-06-13 21:33:07 UTC
FYI, on 5.6 now this will work.