[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:41:42 PST 2011


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





--- Comment #5 from Martin Robinson <mrobinson at webkit.org>  2011-01-21 08:41:42 PST ---
(From update of attachment 79710)
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. 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));

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.

-- 
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