Minor issue with kaddressbook and Keramik
Maks Orlovich
mo002j at mail.rochester.edu
Sun Jul 14 18:53:10 BST 2002
On Sunday 14 July 2002 12:19 am, Mirko Boehm wrote:
> Hey Folks,
>
> 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?
You're mostly wrong, since it's partly a KAddressBook issue and parly a Qt
limitation (which also applies to HighColor). For starters, you've wrapped
all of the widgets in the toolbar into a non-styled QWidget -- so the
behavior is exactly what you requested. Please remember that the style
drawing works through the implementations of the widget's paint methods
calling the current style's appropriate virtuals and asking it to draw the
relevant parts of the widgets. QWidget doesn't do that; it just clears the
background. If you add the widgets directly to the toolbar, it should be
closer to what it should look like -- except for the labels. Since the labels
on toolbars aren't styled widgets either,they don't get the gradient --
that's a Qt limitation unless one resolves to having the style re-do all of
QLabel's painting code, and to handle the paint events itself, which is
extremely risky, and brittle, as if QLabel gets some new functionality in Qt
3.1 stuff will break. The workaround for this is to use a modified
QToolButton instead (that's what Konqueror does, for example). Since this
just seems to popup in many places (Konqui, KDict, some of the games, and now
KAddressBook), perhaps a new widget that does this would be a good idea;
anyone have any thoughts on that (Gallium?)?.
-Maksim
More information about the kde-core-devel
mailing list