[Xfce4-commits] [panel-plugins/xfce4-cpugraph-plugin] 13/16: Draw background color

noreply at xfce.org noreply at xfce.org
Wed May 29 04:10:14 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-cpugraph-plugin.

commit 78c65a880cfa71431d1c03245b8d89e65af4983c
Author: Andre Miranda <andreldm at xfce.org>
Date:   Tue Apr 23 00:27:13 2019 -0300

    Draw background color
---
 panel-plugin/cpu.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/cpu.c b/panel-plugin/cpu.c
index 12506cf..24a64f6 100644
--- a/panel-plugin/cpu.c
+++ b/panel-plugin/cpu.c
@@ -352,14 +352,17 @@ static gboolean tooltip_cb( GtkWidget *widget, gint x, gint y, gboolean keyboard
 static void draw_area_cb( GtkWidget * widget, cairo_t * cr, gpointer data )
 {
 	CPUGraph *base = (CPUGraph *) data;
-	GtkWidget *da = base->draw_area;
 	GtkAllocation alloc;
 	gint w, h;
 
-	gtk_widget_get_allocation( da, &alloc );
+	gtk_widget_get_allocation( base->draw_area, &alloc );
 	w = alloc.width;
 	h = alloc.height;
 
+	gdk_cairo_set_source_rgba(cr, &base->colors[0]);
+	cairo_rectangle(cr, 0, 0, w, h);
+	cairo_fill(cr);
+
 	switch( base->mode )
 	{
 		case 0:

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


More information about the Xfce4-commits mailing list