KPageWidget forces icons to 32x32
Allen Winter
winter at kde.org
Tue Sep 4 23:47:44 BST 2007
On Friday 27 July 2007 2:56:45 pm Jason 'vanRijn' Kasper wrote:
> re, all. I've asked Tobias for advice on this issue and he asked me to
> include core-devel on it...
>
Is this still an issue?
If not, what to do about it?
> The issue that I'm facing is that KPilot used to use a KJanusWidget with 64x64
> icons on the left side for its main GUI screen. I'm using KPageWidget now,
> but the icons on the left are hard-coded to 32x32 in size. For the
> before/after, see here: http://www.flickr.com/photos/vr/880215965/
>
> I think the hard-coding of the size to 32x32 in KPageWidget should be replaced
> by something based on the pixmaps contained in the QIcon, if possible, and
> allow the user to override the size. I was thinking like this:
>
> if user has explicitly called setIconSize() (not presently there)
> then
> use specified icon size
> else if the QIcon being painted has only one file/pixmap
> then
> inspect QIcon::actualSize() and use that value
> else
> default to some reasonable size (32x32)
> fi
>
> The first issue is that I don't see that there's a way to tell how many
> files/pixmaps are in the {K,Q}Icon to do the "else if" part. Does anyone
> have any thoughts/suggestions on this?
>
> Please see below for my questions/answers/discussion thus far with Tobias.
>
> Thanks! =:)
>
> On Friday 27 July 2007, Tobias Koenig wrote:
> > On Thu, Jul 26, 2007 at 05:00:28PM -0400, Jason 'vanRijn' Kasper wrote:
> > > Hi Tobias,
> >
> > Hi Jason,
> >
> > > I was talking with Keith Neuse in #kde4-devel and he was looking into
> > > adding a setIconSize(QSize) method. It seemed to me, though, that
> > > perhaps the correct way to do this would be to detect from the Icon
> > > itself what the size of the images should be on the left page list and
> > > not change them.
> >
> > Hmm, how shall this auto-detection work? If you have installed the same
> > icon in 16x16, 32x32, 48x48 and 64x64, which shall be used? Always the
> > biggest?
> >
> > > Can you let me know your thoughts on this when you get a chance please?
> > > Is this something that you'd be open to a patch for?
> >
> > You are right, the icon size is hardcoded at the moment
> > (kpageview_p.cpp:337 and kpageview_p.cpp:378).
> >
> > This should be changed to KIcon3::Desktop at least.
> >
> > I'm not sure about the setIconSize() method, it is something that
> > belongs to the itemdelegate imho, so it should be part of model.
> > On the other hand it should be consistent for all items...
> >
> > Could you ask on core-devel please?
> >
> > Ciao,
> > Tobias
>
--
KDEPIM Developer
I accept PayPal payments to awinterz at earthlink.net
More information about the kde-core-devel
mailing list