[gnome-panel/gtk3] clock-map: Port to GtkStyleContext
- From: Germán Poó Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/gtk3] clock-map: Port to GtkStyleContext
- Date: Sun, 30 Jan 2011 09:38:13 +0000 (UTC)
commit 40391453286cce55039932d6dc3f741bb74e385f
Author: Germán Póo-Caamaño <gpoo gnome org>
Date: Sun Jan 30 01:37:46 2011 -0800
clock-map: Port to GtkStyleContext
Signed-off-by: Germán Póo-Caamaño <gpoo gnome org>
applets/clock/clock-map.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/applets/clock/clock-map.c b/applets/clock/clock-map.c
index 4ab91d8..24a1465 100644
--- a/applets/clock/clock-map.c
+++ b/applets/clock/clock-map.c
@@ -225,10 +225,12 @@ static gboolean
clock_map_draw (GtkWidget *this, cairo_t *cr)
{
ClockMapPrivate *priv = PRIVATE (this);
- GtkStyle *style;
+ GtkStyleContext *context;
+ GdkRGBA color;
int width, height;
- style = gtk_widget_get_style (this);
+ context = gtk_widget_get_style_context (this);
+ gtk_style_context_get_color (context, GTK_STATE_FLAG_ACTIVE, &color);
width = gdk_pixbuf_get_width (priv->shadow_map_pixbuf);
height = gdk_pixbuf_get_height (priv->shadow_map_pixbuf);
@@ -245,7 +247,7 @@ clock_map_draw (GtkWidget *this, cairo_t *cr)
/* draw a simple outline */
cairo_rectangle (cr, 0.5, 0.5, width - 1, height - 1);
- gdk_cairo_set_source_color (cr, &style->mid [GTK_STATE_ACTIVE]);
+ gdk_cairo_set_source_rgba (cr, &color);
cairo_set_line_width (cr, 1.0);
cairo_stroke (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]