Review Request 119879: call style()->drawControl rather than drawItemText to handle button painting in kmultitabbar

Hugo Pereira Da Costa hugo.pereira at free.fr
Thu Aug 21 10:19:20 UTC 2014


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

Review request for KDE Frameworks, Christoph Feck, Gilles Caulier, and Marko Käning.


Repository: kwidgetsaddons


Description
-------

As said in the title ...

This is needed for styles that would do more fancy things, such as, change the color (breeze), add a shadow (mac) or what else (change the font, etc.)

Now thinking more about it:
all this paintEvent stuff is needed to handle rotated (vertical) buttons. one could make it much simpler by: 
- rotate the painter once and for all in one direction
- rotate the pixmap in the other direction

Call directly drawComplexControl( CC_ToolButton )
(instead of the 'sub' drawContal calls)

That would deal automatically with the options, spacing, margins, etc. in one go.

In fact I have a custom class here that does just that. 
Should I implement and test, instead of the fix above ?

This would also have a good chance to fix bug 296810


Diffs
-----

  src/kmultitabbar.cpp 7af343b 

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


Testing
-------

looks good with breeze, oxygen, fusion


Thanks,

Hugo Pereira Da Costa

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


More information about the Kde-frameworks-devel mailing list