After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 621669 - [StThemeNode] implement CSS "outline" property
[StThemeNode] implement CSS "outline" property
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Florian Müllner
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-06-15 16:48 UTC by Dan Winship
Modified: 2010-06-17 18:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[StThemeNode] implement CSS "outline" property (8.97 KB, patch)
2010-06-15 16:48 UTC, Dan Winship
needs-work Details | Review
[StThemeNode] implement CSS "outline" property (10.55 KB, patch)
2010-06-17 15:03 UTC, Dan Winship
needs-work Details | Review
[StThemeNode] implement CSS "outline" property (11.21 KB, patch)
2010-06-17 16:53 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2010-06-15 16:48:22 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?)
Comment 1 Dan Winship 2010-06-15 16:48:24 UTC
Created attachment 163695 [details] [review]
[StThemeNode] implement CSS "outline" property

to be used for focus indication
Comment 2 Florian Müllner 2010-06-16 22:23:41 UTC
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.
Comment 3 Dan Winship 2010-06-17 15:03:14 UTC
Created attachment 163926 [details] [review]
[StThemeNode] implement CSS "outline" property

fixed st_theme_node_get_paint_box()
Comment 4 Florian Müllner 2010-06-17 16:40:24 UTC
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.
Comment 5 Dan Winship 2010-06-17 16:53:55 UTC
Created attachment 163936 [details] [review]
[StThemeNode] implement CSS "outline" property

take 3
Comment 6 Florian Müllner 2010-06-17 17:37:16 UTC
Review of attachment 163936 [details] [review]:

Looks good.
Comment 7 Dan Winship 2010-06-17 18:07:37 UTC
Attachment 163936 [details] pushed as cae61e6 - [StThemeNode] implement CSS "outline" property