[gnome-panel] Revert "button-widget: don't use deprecated style properties"



commit 7d5843e95336f925ccc8b7229957ef743a84162b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Dec 20 00:42:29 2015 +0200

    Revert "button-widget: don't use deprecated style properties"
    
    This reverts commit bcc60abe0a667b6a0bbe84ebd567664255f1e926.

 gnome-panel/button-widget.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/gnome-panel/button-widget.c b/gnome-panel/button-widget.c
index 830c14e..05a0919 100644
--- a/gnome-panel/button-widget.c
+++ b/gnome-panel/button-widget.c
@@ -409,6 +409,27 @@ button_widget_draw (GtkWidget *widget,
                 cairo_restore (cr);
        }
 
+       if (gtk_widget_has_focus (widget)) {
+               gint focus_pad;
+
+                gtk_style_context_save (context);
+                gtk_style_context_set_state (context, state_flags);
+
+               gtk_widget_style_get (widget,
+                                     "focus-padding", &focus_pad,
+                                     NULL);
+               x = focus_pad;
+               y = focus_pad;
+               w = width -  2 * focus_pad;
+               h = height - 2 * focus_pad;
+
+                cairo_save (cr);
+               gtk_render_focus (context, cr, x, y, w, h);
+                cairo_restore (cr);
+
+                gtk_style_context_restore (context);
+       }
+       
        return FALSE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]