[Xfce4-commits] [panel-plugins/xfce4-time-out-plugin] 06/15: Use gtk_widget_override_background_color for now

noreply at xfce.org noreply at xfce.org
Fri Oct 4 05:13:41 CEST 2019


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-time-out-plugin.

commit 94ef7e5f0323edea8fd9da06f8bb042e8eb9b4fc
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sat Sep 28 16:36:44 2019 -0300

    Use gtk_widget_override_background_color for now
---
 panel-plugin/time-out-lock-screen.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/panel-plugin/time-out-lock-screen.c b/panel-plugin/time-out-lock-screen.c
index 739c43e..91e184e 100644
--- a/panel-plugin/time-out-lock-screen.c
+++ b/panel-plugin/time-out-lock-screen.c
@@ -166,6 +166,8 @@ time_out_lock_screen_init (TimeOutLockScreen *lock_screen)
   GtkWidget *box;
   GtkWidget *vbox;
   GtkWidget *image;
+  GtkStyleContext *context;
+  GdkRGBA rgba;
 
   lock_screen->display_seconds = TRUE;
   lock_screen->allow_postpone = TRUE;
@@ -179,7 +181,11 @@ time_out_lock_screen_init (TimeOutLockScreen *lock_screen)
 
   /* Draw border around the window */
   border = gtk_event_box_new ();
-  gtk_widget_modify_bg (border, GTK_STATE_NORMAL, &(GTK_WIDGET (lock_screen->window)->style->bg[GTK_STATE_SELECTED]));
+
+  context = gtk_widget_get_style_context (GTK_WIDGET (lock_screen->window));
+  gtk_style_context_get_color(context, GTK_STATE_SELECTED, &rgba);
+
+  gtk_widget_override_background_color (border, GTK_STATE_NORMAL, &rgba);
   gtk_container_add (GTK_CONTAINER (lock_screen->window), border);
   gtk_widget_show (border);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list