GNOME Bugzilla – Bug 621669
[StThemeNode] implement CSS "outline" property
Last modified: 2010-06-17 18:07:39 UTC
i wrote this for focus support, though it's not clear at this point that we'll use it. (In particular, you can't specify that you want a round-cornered outline; the implementation doesn't *have to* make it perfectly rectangular, but there's no way for the CSS to control the shape it has.) The code works though, and we could perhaps make use of it elsewhere (lg?)
Created attachment 163695 [details] [review] [StThemeNode] implement CSS "outline" property to be used for focus indication
Review of attachment 163695 [details] [review]: The code exists and works and implements part of CSS2 - I think that's reason enough to include it. The code looks good and works well with one exception - as it paints itself outside the widget's allocation, it does not work with transitions. To fix, you'll need to modify st_theme_node_get_paint_box() to take the outline property into account.
Created attachment 163926 [details] [review] [StThemeNode] implement CSS "outline" property fixed st_theme_node_get_paint_box()
Review of attachment 163926 [details] [review]: ::: src/st/st-theme-node.c @@ +2697,3 @@ + if (outline_width) + outline_width = st_theme_node_get_outline_width (node); + While this should work in practice, it's still slightly wrong: If both shadow and outline are used, the returned box is larger than the actual painted area - the outline is drawn relative to actor_box, but paint_box is set as if shadows were considered in the outline.
Created attachment 163936 [details] [review] [StThemeNode] implement CSS "outline" property take 3
Review of attachment 163936 [details] [review]: Looks good.
Attachment 163936 [details] pushed as cae61e6 - [StThemeNode] implement CSS "outline" property