[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: kde-app and diabled icons
From:       Martijn Klingens <mklingens () yahoo ! com>
Date:       2001-06-30 21:28:01
[Download RAW message or body]

On Saturday 30 June 2001 22:56, Thomas Satzinger wrote:
> On Saturday 30 June 2001 21:41, Martijn Klingens wrote:
> > On Saturday 30 June 2001 21:19, Thomas Satzinger wrote:
> > > hi there,
> > >
> > > i use kdevelop to create an app
> > > the wizard buils a couple of standard menus, some with icons.
> > > the disbled ones look very pretty, shaded in color
> > > when i add my own icons, they look good enabled, but disabled they
> > > look like black carved.
> > > what do i do wrong at this point
> > > any ideas?
> >
> > How do you load the icons? Using for example SmallIcon or SmallIconSet
> > from kiconloader.h? IIRC the QIconSet has different images for different
> > states, the normal icon that is used otherwise has not.
>
> i do the following
> KGlobal::instance()->iconLoader()->loadIcon( "name_of_icon_file",
> KIcon::NoGroup, KIcon::Small )
>
> i have the icon in $kde_dir/share/icons
>
> i have read somewhere, that kde takes care to apply the visual effect for
> different situations(enabled/disbaled)but somehow it doesn´t work here for
> me
>
> i think i did oversee something very aesy

Well.. I returns a QPixmap and AFAIK you need a QIconSet to have a set of 
different icons depending on the state. But I'm not sure what method is 
recommended there.

I personally always use the global functions from kiconloader.h:

QIconSet *is = SmallIcon( "name-of_icon_file" );

But I'm not at all sure that is the best way. It seems to work though.

Martijn
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic