From kde-core-devel Wed Mar 21 22:50:39 2001 From: mosfet Date: Wed, 21 Mar 2001 22:50:39 +0000 To: kde-core-devel Subject: Re: QPushButton problem with KDE styles X-MARC-Message: https://marc.info/?l=kde-core-devel&m=98521503916571 Martijn Klingens wrote: > > On Tuesday 20 March 2001 21:32, Matthias Ettrich wrote: > > Thanks for bringing that up. The solution is simple: change the > > drawPushButton button functions in the KDE styles according to what the Qt > > styles do (have a look at qwindowsstyle.cpp, for example). > > Hmmm... I now have converted the b3, the kstep, the default and the highcolor > style. But I'm having problems with the remaining three themes in my control > panel: System++, System-Series and Marble. The themerc files of those themes > are in a normal rc file format and do not refer to C++ code. How can I > convert them? > These are pixmap widget themes. The widget theme engine is in kdeui in: kthemestyle.* and kthemebase.*. KThemeStyle contains the actual drawing code. > Another question: the Qt code uses explicitly > iconSet->pixmap(QIconSet::Small) instead of pixmap() or > pixmap(QIconSet::Automatic) thus forcing small images. Why is this? I'd > assume the programmer decides the icon size and not the style plugin. In > order not to distort the size hinting and such I have used the same code, but > it makes me wonder. > > I have attached the current code for review as some people are afraid that I > might change the look of certain styles. Please review and test, so I can > commit. To test: add something like > Go ahead, we talked about it already ;-) > QPushButton *test = new QPushButton( SmallIcon("konqueror" ), > "&Caption", this ); > > to your code. > > When I commit this, can I add icons to existing buttons and dialogs when I > have some time to spare, or should I only use this for my own code? > > NOTE: These icons are actually supported since KDE 2.0, it's just that the > themes didn't show them. There are no compatibility problems when using > them. The worst that might happen is that the icons are not shown on pre KDE > 2.2 systems. > > TIA, > > Martijn > > P.S.: the kdelibs/kstyles directory is a mess IMHO. There are quite a few > directories that are _NOT_ used there: kstep-highcolor, pillbox, > pillbox-highcolor. Also, the themes directory names a theme called 'beos', > but there is no associated style on my system (although the themerc sais it > does). And finally the naming convention for directories that actually > contain something that is used in KDE is not quite the same: highcolor has no > suffix at all, ksgistyle has the 'style' suffix in the directory name and b3 > for example has 'plugin' as suffix (b3plugin/). Very confusing if you're > looking for the dir containing a given style. > > ------------------------------------------------------------------------ > Name: kdelibs.diff > kdelibs.diff Type: text/x-c++ > Encoding: base64 > Description: KDE Styles patch