Review Request 120278: Fixed size hint and positioning of icons in kpagelistview in high dpi mode

Hugo Pereira Da Costa hugo.pereira at free.fr
Fri Sep 19 08:06:52 UTC 2014


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

Review request for KDE Frameworks.


Repository: kwidgetsaddons


Description
-------

As mentionned in the title.

Steps to reproduce:
use latest qt-5.4
set QT_DEVICE_PIXEL_RATIO to 2
run oxygen-demo5 --highdpi
(you need latest from oxygen repository to have the option available)

Code applies already to Qt-5.3 (and does nothing) so no ifdef is needed.

Code is inspired from what is done in QCommonStyle:
QPixmap pixmap = button->icon.pixmap(button->iconSize, mode, state);

    int pixmapWidth = pixmap.width() / pixmap.devicePixelRatio();
    int pixmapHeight = pixmap.height() / pixmap.devicePixelRatio();


(line 1247 or so)


Diffs
-----

  src/kpageview_p.cpp 5b665cd 

Diff: https://git.reviewboard.kde.org/r/120278/diff/


Testing
-------

With/withough high dpi enabled
any widget style


File Attachments
----------------

before
  https://git.reviewboard.kde.org/media/uploaded/files/2014/09/19/a01fec9f-06bc-43d6-8bd6-30390f4b5c74__kpageview-old.png
after
  https://git.reviewboard.kde.org/media/uploaded/files/2014/09/19/464ef761-60e9-455b-8398-b2c71cef6468__kpageview-new.png


Thanks,

Hugo Pereira Da Costa

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


More information about the Kde-frameworks-devel mailing list