Review Request 120277: Fix size hint and positioning of klineedit clear button in high dpi mode
Hugo Pereira Da Costa
hugo.pereira at free.fr
Fri Sep 19 07:54:18 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120277/
-----------------------------------------------------------
Review request for KDE Frameworks.
Repository: kcompletion
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)
Note: there is similar fixing to be done in KPageWidget (and possibly elsewhere). I'll post a review next.
Diffs
-----
src/klineedit_p.h d2be5ab
Diff: https://git.reviewboard.kde.org/r/120277/diff/
Testing
-------
With/withough high dpi enabled
any widget style
File Attachments
----------------
before
https://git.reviewboard.kde.org/media/uploaded/files/2014/09/19/72d0cc3d-c6d4-4e8d-a337-3e582446c67e__klineedit-old.png
after
https://git.reviewboard.kde.org/media/uploaded/files/2014/09/19/570163fb-69d3-465f-a78b-9465126d446d__klineedit-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/336a5093/attachment.html>
More information about the Kde-frameworks-devel
mailing list