From kde-core-devel Wed Feb 13 21:18:59 2002 From: Scott Wheeler Date: Wed, 13 Feb 2002 21:18:59 +0000 To: kde-core-devel Subject: Re: KToolBar::iconSize() X-MARC-Message: https://marc.info/?l=kde-core-devel&m=101363523114438 On Wednesday 13 February 2002 12:50 pm, David Faure wrote: > The value of m_iconSize has to remain IMHO. > The API, though, could be fixed, so that it returns the actual size, i.= e. > iconSize() would query KIconTheme::currentSize (IIRC) to get the correc= t > size. However one would need to check if any KDE app uses iconSize() > currently, to see if it relies on it being 0 if default - could you che= ck > that? The only thing that I found (I greped my entire KDE dir structure) that u= ses=20 this is in kanimwidget.cpp: =3D=3D=3D if (parent()->inherits( "KToolBar" )) d->size =3D ((KToolBar*)parent())->iconSize(); if (!d->size) d->size =3D KGlobal::iconLoader()->currentSize(KIcon::MainToolbar); =3D=3D=3D As you can see, it has a workaround for this in it that wouldn't be neede= d=20 with the suggested fix. =20 I understand what you're saying about the internals of KToolBar. I'm sti= ll=20 pretty new at hacking on the libs that I'm learning as I go. Aside from=20 staying consistent with other implementations it didn't seem very=20 straightforward. Do you want me to come up with a patch or do you want to take care of thi= s? -Scott