[PATCH}Re: Konqueror throbber size -- too small and doesn't resize
James Richard Tyrer
tyrerj at acm.org
Wed Jun 11 23:59:25 BST 2008
David Faure wrote:
> On Wednesday 11 June 2008, James Richard Tyrer wrote:
>> I don't know why I am getting 30 pixels.
>>
>> So, I tried different font sizes for the Menu font and it does not
>> change the throbber size. So, the problem is probably as you said that
>> the layout hasn't been done yet and the 30 pixels is probably the
>> default height.
>
> Yes. Please read the code in svn, I fixed all this already. But fredrikh made
> me realize that setting an icon size to 18x18 or 19x19 was a bad idea,
> the pixmap gets scaled, so now I understand your if()s that round to a known
> icon size. I'll merge this in, but I'll also force the button size so that it gets
> vertically centered, this is what was bothering me most.
>
I was having build problems so didn't get to try this till now. It
doesn't seem to work for me. I get a 21x21 icon with a 12 pt. Menu font
and the same with a 24 pt..
Yes, the icons sizes should be set to one of the standard values as my
patch does. We have KDE throbber icons in 16x16, 22x22, 32x32 & 48x48.
So, somewhere after 48 we should go to variable size. The code in my
patch:
+ if ( size < KIconLoader::SizeSmallMedium )
+ size = KIconLoader::SizeSmall;
+ else if ( size < KIconLoader::SizeMedium )
+ size = KIconLoader::SizeSmallMedium;
+ else if ( size < KIconLoader::SizeLarge )
+ size = KIconLoader::SizeMedium ;
+ else if ( size < KIconLoader::SizeHuge )
+ size = KIconLoader::SizeLarge;
does this for sizes greater than or equal to "SizeHuge" -- that is,
"SizeHuge" or larger drops through the If-Else structure unchanged. I
don't suppose that we really need to worry about a throbber larger than
48x48 but I was asked to also make an SVG which I have put on my to-do list.
Your code is rather complex. Should we consider it a bug in Qt that
using: "(menuBar()->contentsRect()).height()" doesn't provide us with
the correct number?
Thanks for working on this. It seemed like it would be simple when I
started.
--
JRT
More information about the kfm-devel
mailing list