Minor issue with kaddressbook and Keramik

Karol Szwed gallium at physos.info
Wed Jul 17 09:44:33 BST 2002


On Sunday 14 July 2002 2:19 pm, Mirko Boehm wrote:
>when I made incremental search a toolbar in kaddressbook, I had to use the
>option to use an arbitrary widget as a toolbar element. When using Keramik
> as your style, you will experience the UI elements being drawn flat, unlike
> the other nicely rounded toolbar elements.
>
>I consider this to be a problem of the Keramik style, or am I wrong?

Its a generic style problem for any styles that draw the toolbar background.

Since many apps seem to have this problem, I've finally decided to fix this in 
a more sane way rather than forcing app designers to create custom toolbar 
widgets that inherit from QToolButton. For KDE 3.0, I changed the QLabel in 
konqueror to a QToolButton for the "Location" label as a temporary solution 
to avoid the "flat widget" problem, but I'll be able to revert this now. Any 
apps using similar "hacks" can do the same soon.

So you will now be able to add labels, custom widgets etc directly into a 
toolbar without modification. All you need to do in your apps is:

For any widget you insert into a toolbar that you want to have a gradient 
background, just do a:

widget->setName("kde toolbar widget");

The style's eventFilters will then draw the correct background automagically. 
I think you will agree that this is a much cleaner solution for app writers 
than having to implement a custom widget or a QToolButton derivative.

I'm patching the keramik style to support this at the moment, and the 
highcolor one should work as expected already. KThemeStyle still needs 
patching.

Let me know how this works out for you.

Cheers,
Karol.





More information about the kde-core-devel mailing list