[KDE/Mac] Review Request 126626: fix appearance under Qt5/KF5

René J.V. Bertin rjvbertin at gmail.com
Mon Jan 4 16:50:48 UTC 2016


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

Review request for KDE Software on Mac OS X and Yichao Yu.


Repository: qtcurve


Description
-------

This patch fixes the appearance issue that has long plagued the Qt5 version of QtCurve.

The actual fix is in the pixmap cache implementation in `Style::drawLightBevel()`. There is no need to generate the cache pixmap on a scale other than 1; removing that "trick" and setting an explicit antialias (AA) hint before drawing to the pixmap solved the appearance issue.

I cannot believe though that this had not been tried before (drawing at scale 1.2 was "another attempt to fix the issue" introduced a bit under a year ago), so I have left the other things I tried before finally succeeding:

- I checked leaving AA on all the time rather than turning it off in specific locations, through a macro (`QPAINTER_ANTIALIAS_MAYBE_ON`).
- I received a hint that Qt5 might not observe AA settings when drawing lines with width 1 (exact), so I investigated the effect of using widths slightly different from 1 (`#define QPENWIDTH 1.01`, ...)

Both experiments have been turned back/off but involve subtle rearrangement of calls that might contribute to the fact that generating cache pixmaps at scale=1 now gives a correct appearance.
I would thus suggest leaving those changes, despite the fact they make the code a little bit more complex.


Diffs
-----

  qt5/style/qtcurve.cpp 89de3b6 
  qt5/style/qtcurve_api.cpp 9b7adfa 
  qt5/style/qtcurve_p.h 91e21c2 
  qt5/style/qtcurve_primitive.cpp 51653c7 
  qt5/style/qtcurve_utils.cpp ac516bf 

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


Testing
-------

On OS X 10.9.5 and Linux, both with Qt 5.5.1 and KF5 5.17.0 installed into /opt/local


Thanks,

René J.V. Bertin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20160104/38aa8bf4/attachment.html>


More information about the kde-mac mailing list