diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2014-05-01 18:12:35 +0200 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2014-05-01 18:14:49 +0200 |
commit | 489970bcdc15eaa78286d560fa2bf30a45b87eb6 (patch) | |
tree | b64c687417f27f26691d7262ece82bc45457a674 /gtk/gtkroundedbox.c | |
parent | e8cbbedbb25bfee7f8a3dc987ab2d5d3db290246 (diff) | |
download | gtk+-489970bcdc15eaa78286d560fa2bf30a45b87eb6.tar.gz |
themingengine: use outlines to render focus rings
Instead of the old non-CSS implementation. This allows us to get rid of
the very last piece of custom theming in Adwaita.
Diffstat (limited to 'gtk/gtkroundedbox.c')
-rw-r--r-- | gtk/gtkroundedbox.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/gtkroundedbox.c b/gtk/gtkroundedbox.c index 653d27feef..5aa53def2a 100644 --- a/gtk/gtkroundedbox.c +++ b/gtk/gtkroundedbox.c @@ -138,6 +138,21 @@ _gtk_rounded_box_apply_border_radius_for_engine (GtkRoundedBox *box, _gtk_rounded_box_apply_border_radius_for_context (box, _gtk_theming_engine_get_context (engine), junction); } +void +_gtk_rounded_box_apply_outline_radius_for_engine (GtkRoundedBox *box, + GtkThemingEngine *engine, + GtkJunctionSides junction) +{ + GtkCssValue *corner[4]; + + corner[GTK_CSS_TOP_LEFT] = _gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_OUTLINE_TOP_LEFT_RADIUS); + corner[GTK_CSS_TOP_RIGHT] = _gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_OUTLINE_TOP_RIGHT_RADIUS); + corner[GTK_CSS_BOTTOM_LEFT] = _gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_OUTLINE_BOTTOM_LEFT_RADIUS); + corner[GTK_CSS_BOTTOM_RIGHT] = _gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_OUTLINE_BOTTOM_RIGHT_RADIUS); + + _gtk_rounded_box_apply_border_radius (box, corner, junction); +} + static void gtk_css_border_radius_grow (GtkRoundedBoxCorner *corner, double horizontal, |