[webkit-gtk] Styling the embedded media player
Xabier Rodriguez Calvar
calvaris at igalia.com
Wed Apr 17 11:02:05 PDT 2013
O Ven, 12-04-2013 ás 14:57 -0300, Manuel Quiñones escribiu:
> What I did so far was injecting CSS through webview_execute_script and
> replaced the styles here:
> - http://trac.webkit.org/browser/trunk/Source/WebCore/css/mediaControls.css
> - http://trac.webkit.org/browser/trunk/Source/WebCore/css/mediaControlsGtk.css
This is a good idea, though I was even thinking that we should provide
an easier way of letting 3rd parties to modify that. I didn't have time
for that yet, but if you can come up with an idea, it is welcome.
> So I did the buttons bigger but couldn't resize the graphics inside
> them. I don't see any definition for this in the CSS, but I see they
> use -webkit-appearance and then I came into this convesation:
>
> https://lists.webkit.org/pipermail/webkit-dev/2011-April/016593.html
AFAIK, the appearance has nothing to do with the icon size. A size of
30x30 is specified in the CSS but that affects the size of the button,
not the icon. The size of the icon was hardcoded (and I didn't touch
that) in the C++ code, see:
http://trac.webkit.org/browser/trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp?rev=143463#L493
Something nasty that you can do is having a custom patch for your WK to
change that, though a better solution would be changing WK to make the
icon size depend on the CSS. Wild ideas that I can have now are:
I. Playing with the padding and margin to see if you can find a way
of leaving the same size of 16px but that is not hardcoded in
the C++.
II. Seeing if you can specify a custom property that has no effect
when creating the boxes layout and that you can read from C++ to
select the icon size.
Best regards.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20130417/4802e247/attachment-0001.sig>
More information about the webkit-gtk
mailing list