KPageWidget forces icons to 32x32

Jason 'vanRijn' Kasper vr at movingparts.net
Wed Sep 5 04:33:49 BST 2007


I don't believe I ever saw any responses to my question.  The situation is 
still the same, I believe.  The size of the pixmap is still being hard-coded 
to 32x32:

.-(~/kde4/src/kdelibs/kdeui/paged)-
`--> grep 32 *
kpageview_p.cpp:  const QPixmap pixmap = icon.pixmap( 32, 32 );
kpageview_p.cpp:  const QPixmap pixmap = icon.pixmap( 32, 32 );

I guess that for KPilot, it's not that big of a deal, and we certainly have 
bigger problems than the size of our icons not being the same size that they 
were in kde3.  If nobody else is complaining about it, I'm content to drop 
the issue.  =:)

On Tuesday 04 September 2007, Allen Winter wrote:
> 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



-- 
 -[ Jason 'vanRijn' Kasper    //  http://movingparts.net ]-
 -[ KDE PIM Developer         //  http://www.kde.org  ]-
 -[ bash fun -> :(){ :|:&};:  //  Numbers 6:22-26 ]-




More information about the kde-core-devel mailing list