Review Request 122705: Make KRatingWidget cope with devicePixelRatio

Christoph Feck cfeck at kde.org
Tue Feb 24 10:32:44 UTC 2015


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



src/kratingpainter.cpp
<https://git.reviewboard.kde.org/r/122705/#comment52696>

    Please add spaces around '/' binary operator.
    
    But why not simply use
    
    QSize ratingPixSize = ratingPix.size() / ratingPix.devicePixelRatio();
    
    It is documented to do rounding, would that be bad or preferred?



src/kratingpainter.cpp
<https://git.reviewboard.kde.org/r/122705/#comment52697>

    dito


- Christoph Feck


On Feb. 24, 2015, 8:11 a.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122705/
> -----------------------------------------------------------
> 
> (Updated Feb. 24, 2015, 8:11 a.m.)
> 
> 
> Review request for KDE Frameworks and Christoph Feck.
> 
> 
> Repository: kwidgetsaddons
> 
> 
> Description
> -------
> 
> All geometry calculations should be done with
> image.size() / image.devicePixelRatio()
> 
> 
> Diffs
> -----
> 
>   src/kratingpainter.cpp 0bded43 
>   src/kratingwidget.cpp 09cd28f 
>   tests/kratingwidgettest.cpp 5465bce 
> 
> Diff: https://git.reviewboard.kde.org/r/122705/diff/
> 
> 
> Testing
> -------
> 
> Ran KRatingWidget with high DPI pixmaps. All icons now fit properly.
> 
> Ran gwenview with Qt::AA_UseHighDpiPixmaps and QT_DEVICE_PIXEL_RATIO=2
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150224/b55a8a88/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list