Konqueror throbber size -- too small and doesn't resize

James Richard Tyrer tyrerj at acm.org
Fri Jun 6 17:34:27 BST 2008


David Faure wrote:
> On Wednesday 04 June 2008, James Richard Tyrer wrote:
>> I find in: kdebase/apps/konqueror/src/konqmainwindow.cpp, line 3762
>>
>> int size = style()->pixelMetric(QStyle::PM_SmallIconSize, NULL,
>> 	m_paAnimatedLogo);
>>
>> appears to set the size to "SmallIconSize" rather than choosing a size 
>> based the pixel size of the menu bar which seems to be dependent on the 
>> pixel size of menuFont.
> 
> Yeah, but the real problem seems to be the margin inside the QToolButton.
> I tried int size = menuBar()->height() and obviously this was too big, but it
> shows that the button contains a lot of inner padding -- much more than when
> a QToolButton is put into a toolbar. This has to come from the widget style I think?
> I see no special logic for this inside QToolButton. Cc'ing Casper who might have an
> idea about this problem: how to get a toolbutton without inner margins, and what
> would be the right icon size for a toolbutton that is put into a menubar?
> 
> I tried   m_paAnimatedLogo->setContentsMargins(0, 0, 0, 0); but it has no effect,
> I think the style is changing the contents margins later on...
> 
See commit 817650

I tried:

	int size = menuBar()->height();

and the throbber is a little two large, but I think I fixed your problem 
-- no boarder; if fills the whole button.

Is it possible to get the height of the Menu font rather than the height 
of the menu or is it necessary to use QStyle::PM_MenuBarVMargin to 
reduce it?

-- 
JRT





More information about the kfm-devel mailing list