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

List:       kde-devel
Subject:    Re: Action icons are ugly because they are generated from the wrong surce and sometimes displayed in
From:       Erik Sigra <sigra () home ! se>
Date:       2003-03-05 14:21:19
[Download RAW message or body]

onsdagen den 5 mars 2003 14.40 skrev Erik Sigra:
> I have problems with action icons in my application. They appear ugly with
> certain settings because they are generated from the wrong surce.
>
> Bug [http://bugs.kde.org/show_bug.cgi?id=55552]:
> The file "qiconset.html" in the Qt documentation says:
>
> 	"The default small size is 22 x 22, while the default large size is 32 x
> 32."
>
> But the icon configurator for small icons does not let me chose the size
> 22. It only lets me "chose" size 16. This has the consequence that icons in
> menus have size 22 icons downscaled to ugly size 16 icons instead. This
> only happens with icons loaded from a standard directory like
> "<KDEPREFIX>/share/apps/<APPNAME>/icons/hicolor/22x22/actions". If I
> generate a QPixmap with the size 22 and assign it to an action, the menu
> will show the icon unscaled and beautiful.
>
> Bug [http://bugs.kde.org/show_bug.cgi?id=55556]:
> I have also created size 48 versions of some icons. But when I set the icon
> size to 48 for toolbars in the kontrollcenter and the size 48 icons are
> installed for the application, it uses the size 32 icons upscaled to ugly
> size 48 icons.
>
> Have I missed something or is it really so buggy?

Some more information:
I have an action pointer called "the_action", a function to paint a size 22 
icon and a function to paint a size 32 icon and the following code:

the_action->setIconSet(QIconSet(icon22(), icon32()));

This should be correct according to the documentation:

	"QIconSet::QIconSet(const QPixmap & smallPix, const QPixmap & largePix) 

	Creates an iconset which uses the pixmap smallPix for for displaying a
	small icon, and the pixmap largePix for displaying a large icon."

I have selected size 32 for toolbar icons. The icon returned by icon22 is 
actually displayed in the menu as expected. But guess what is displayed in 
the toolbar among the other size 32 icons? It is not a size 32 icon. It is  
the size 32 icon scaled down to size 22!
 
>> Visit http://mail.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