aboutsummaryrefslogtreecommitdiff
path: root/libmap/cc-timezone-map.c
diff options
context:
space:
mode:
authorkarl-qdh <karl@qdh.org.uk>2011-03-31 09:33:33 +0100
committerkarl-qdh <karl@qdh.org.uk>2011-03-31 09:33:33 +0100
commit54e0f63b2c419aa2555dfd514cbd273bd05260f6 (patch)
tree5665b0bf9bd408eec3c3329147497e6828894fe4 /libmap/cc-timezone-map.c
parentf8923be6312878885431503e0ee372b1e11676ea (diff)
parent51f85a5e06af1dec9fcbd25901b4a65ead6aa2cd (diff)
downloadayatana-indicator-datetime-54e0f63b2c419aa2555dfd514cbd273bd05260f6.tar.gz
ayatana-indicator-datetime-54e0f63b2c419aa2555dfd514cbd273bd05260f6.tar.bz2
ayatana-indicator-datetime-54e0f63b2c419aa2555dfd514cbd273bd05260f6.zip
Merged back with head
Diffstat (limited to 'libmap/cc-timezone-map.c')
-rw-r--r--libmap/cc-timezone-map.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/libmap/cc-timezone-map.c b/libmap/cc-timezone-map.c
index ec12c84..7b7d704 100644
--- a/libmap/cc-timezone-map.c
+++ b/libmap/cc-timezone-map.c
@@ -766,13 +766,23 @@ cc_timezone_map_draw (GtkWidget *widget,
gchar *file;
GError *err = NULL;
gdouble pointx, pointy;
+ gdouble alpha = 1.0;
+ GtkStyle *style;
char buf[16];
gtk_widget_get_allocation (widget, &alloc);
+ style = gtk_widget_get_style (widget);
+
+ /* Check if insensitive */
+ if (gtk_widget_get_state (widget) == GTK_STATE_INSENSITIVE)
+ alpha = 0.5;
+
/* paint background */
- gdk_cairo_set_source_pixbuf (cr, priv->background, 0, 0);
+ gdk_cairo_set_source_color (cr, &style->bg[gtk_widget_get_state (widget)]);
cairo_paint (cr);
+ gdk_cairo_set_source_pixbuf (cr, priv->background, 0, 0);
+ cairo_paint_with_alpha (cr, alpha);
/* paint watermark */
if (priv->watermark) {
@@ -813,7 +823,7 @@ cc_timezone_map_draw (GtkWidget *widget,
alloc.height, GDK_INTERP_BILINEAR);
gdk_cairo_set_source_pixbuf (cr, hilight, 0, 0);
- cairo_paint (cr);
+ cairo_paint_with_alpha (cr, alpha);
g_object_unref (hilight);
g_object_unref (orig_hilight);
}
@@ -836,7 +846,7 @@ cc_timezone_map_draw (GtkWidget *widget,
if (pin)
{
gdk_cairo_set_source_pixbuf (cr, pin, pointx - 8, pointy - 14);
- cairo_paint (cr);
+ cairo_paint_with_alpha (cr, alpha);
g_object_unref (pin);
}