[PATCH}Re: Konqueror throbber size -- too small and doesn't resize

James Richard Tyrer tyrerj at acm.org
Wed Jun 11 04:47:50 BST 2008


David Faure wrote:
> On Monday 09 June 2008, David Faure wrote:
>>     return menuBar()->height() - margin - stylePadding;
> 
> Ah - this is the problem. The layouting hasn't been done yet, so we can't ask 
> for menuBar()->height(), it's the default 30 pixels like any QWidget before it's shown...
> I'll redo this differently.
> 
After reading the dox, I tried this a different way.  See attached. 
IIUC, Qt will compute the size of the contents rectangle in the MenuBar 
so we don't have to do it.

I have gotten rid of the hard coded values.

However, this doesn't work exactly right. :-(

With 12 pt type @ 100 DPI (17 pixel font size) the menu bar is 30 pixels 
high. and that appears to be the value which:

	(menuBar()->contentsRect()).height();

returns.  Since this is 30 pixels, 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.

IIUC, the problem is that the operations are not in the proper order.

At this point, some help would be appreciated.

-- 
JRT

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: throbber1.diff
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20080610/cc213a9a/attachment.ksh>


More information about the kfm-devel mailing list