Review Request 122673: Make Svg, FrameSvg work qith QT_DEVICE_PIXELRATIO

Marco Martin notmart at gmail.com
Fri Mar 6 14:17:49 UTC 2015



> On March 6, 2015, 1:48 p.m., David Edmundson wrote:
> > src/declarativeimports/core/iconitem.cpp, line 326
> > <https://git.reviewboard.kde.org/r/122673/diff/5/?file=353000#file353000line326>
> >
> >     m_icon.pixmap is already scaled. 
> >     
> >     You're doing it twice here.

hmm, no, without this i get pixelated icons


> On March 6, 2015, 1:48 p.m., David Edmundson wrote:
> > src/declarativeimports/core/units.cpp, line 214
> > <https://git.reviewboard.kde.org/r/122673/diff/5/?file=353003#file353003line214>
> >
> >     the layout will be multiplying things by the devicePixelRatio itself.
> >     
> >     This is multiplying things twice.

that's the thing that i'm seeing here (on two different systems) compared to for instance Kai's machine at the sprint:
I actually do *not* get scaled fonts when QT_DEVICE_PIXEL_RATIO is set, so the effect in gridUnit is pretty much as dividing it by two. If i don't multiply this, all sizes end up cutted in half.
What does happen on other systems? aybe behavior in qt changed recently?


- Marco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122673/#review77108
-----------------------------------------------------------


On March 5, 2015, 10:27 a.m., Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122673/
> -----------------------------------------------------------
> 
> (Updated March 5, 2015, 10:27 a.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> (still in progress but here for feedback)
> when QT_DEVICE_PIXELRATIO is something different from 1, the pixmaps generated by Svg will be scaled up to give a proper texture.
> 
> This is complementary but not replacing our current approach:
> the pixelratio that can be accessed by units is now in relation to the qt pixel ratio, spacings are also adjusted accordingly (therefore, spaces and sizes won't need an integer value like pixelratio)
> 
> svg introduces also a scaleFactor property (that is pretty much like its old pixelRatio)
> basically, scalefactor, will scale both the textures *and* all the reported sizes, (old method) pixelratio just scales textures without altering measures (like qt pixelratio likes)
> they are now both used and combined, so a) we can have this working before supporting officially qt pixelratio when will be good enough but b) keeping the old mwthod working for the time being c) by using both at the sae time we can at least scale sizes of values != from integers, for screens that are too dense for 1 and not enough for 2
> 
> 
> Diffs
> -----
> 
>   src/declarativeimports/core/iconitem.cpp 03f40c4 
>   src/declarativeimports/core/svgitem.cpp 570c1c3 
>   src/declarativeimports/core/units.h 6c038ba 
>   src/declarativeimports/core/units.cpp a740145 
>   src/plasma/framesvg.cpp 1bb3510 
>   src/plasma/private/svg_p.h a31d0ac 
>   src/plasma/svg.h 0bcbd7a 
>   src/plasma/svg.cpp 0a0db5e 
>   src/declarativeimports/core/framesvgitem.cpp dae8a4f 
> 
> Diff: https://git.reviewboard.kde.org/r/122673/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Marco Martin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150306/11edba2f/attachment.html>


More information about the Plasma-devel mailing list