PDA

View Full Version : toolbar icon sizes...



soul_rebel
16th March 2006, 20:40
i use kde xml gui creation and make my own kaction objects like this

(void)new KAction(string1, loader.loadIcon((QString)"2uparrow", KIcon::MainToolbar), 0, m_view, SLOT(updatePorts()), actionCollection(), "action");
the problem is that the icon is always 16x16 or 22x22 no matter what size the toolbar actually is (other kstdaction toolbar buttons have the right size and resize properly).
how can change this?

thanks for help

ps.: the icons actually exist in the right size in iconset

Bojan
19th March 2006, 23:19
I am not sure which version you are using, but try this constructor:

http://developer.kde.org/documentation/library/3.4-api/kdeui/html/classKAction.html#a2


The icon is loaded on demand later based on where it is plugged in.

This sounds more reliable maybe. I think most KStdActions are created using this constructor.

Bojan

soul_rebel
20th March 2006, 20:21
amazing how one can read a page over and over and just miss the important bit ;)

thanks alot!