[Webkit-unassigned] [Bug 50624] [GTK] Don't use a fixed size for search field icons

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 21 08:52:29 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=50624





--- Comment #6 from Carlos Garcia Campos <cgarcia at igalia.com>  2011-01-21 08:52:29 PST ---
(In reply to comment #5)
> (From update of attachment 79710 [details])
> I think we have a slight issue here which is that we don't modify the adjustSearchField*ButtonStyle methods, so WebCore doesn't really know how large the icon is. 

Yes, we modify the style in RenderThemeGtk::adjustSearchFieldCancelButtonStyle() and RenderThemeGtk::adjustSearchFieldResultsDecorationStyle()

> We probably want to do something similar to the RenderThemeChromiumSkia which does this to determine the icon size:
> 
>     // Scale the button size based on the font size
>     float fontScale = style->fontSize() / defaultControlFontPixelSize;
>     int cancelButtonSize = lroundf(std::min(std::max(minCancelButtonSize, defaultCancelButtonSize * fontScale), maxCancelButtonSize));
>     style->setWidth(Length(cancelButtonSize, Fixed));
>     style->setHeight(Length(cancelButtonSize, Fixed));

fontsize is always the same for us, so it's not that different to what we currently do settings a fixed size. 

> and them simply centers the icon vertically as we do now. After thinking about this a big, I've decided its probably better to use the font size of the field, rather than the height to figure out the icon size.

I tried it, but it didn't help because the font size was always 13.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list