aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-09-28 12:55:25 +0100
committerConor Curran <conor.curran@canonical.com>2010-09-28 12:55:25 +0100
commit2f8ec1ef668da07f3b74140b8db3b12f87d2cde0 (patch)
tree762a13bd7e007050d5da64a8d4fe1a70c9123da8 /src
parent3282a81299408614457ce01168f23feb7574e368 (diff)
downloadayatana-indicator-sound-2f8ec1ef668da07f3b74140b8db3b12f87d2cde0.tar.gz
ayatana-indicator-sound-2f8ec1ef668da07f3b74140b8db3b12f87d2cde0.tar.bz2
ayatana-indicator-sound-2f8ec1ef668da07f3b74140b8db3b12f87d2cde0.zip
trying workarounds for background gradient problem
Diffstat (limited to 'src')
-rw-r--r--src/play-button.c7
-rw-r--r--src/play-button.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/play-button.c b/src/play-button.c
index 5e8a90d..d15b139 100644
--- a/src/play-button.c
+++ b/src/play-button.c
@@ -102,7 +102,7 @@ static gboolean play_button_expose (GtkWidget *button, GdkEventExpose *event);
static void draw (GtkWidget* button, cairo_t *cr);
-G_DEFINE_TYPE (PlayButton, play_button, GTK_TYPE_DRAWING_AREA);
+G_DEFINE_TYPE (PlayButton, play_button, GTK_TYPE_EVENT_BOX);
/// internal helper functions //////////////////////////////////////////////////
@@ -371,6 +371,7 @@ play_button_init (PlayButton *self)
next_list);
gtk_widget_set_size_request(GTK_WIDGET(self), 200, 50);
+ gtk_event_box_set_visible_window (GTK_EVENT_BOX(self), FALSE);
}
@@ -392,11 +393,11 @@ play_button_expose (GtkWidget *button, GdkEventExpose *event)
cairo_t *cr;
cr = gdk_cairo_create (button->window);
- cairo_rectangle (cr,
+ /*cairo_rectangle (cr,
event->area.x, event->area.y,
event->area.width, event->area.height);
- cairo_clip(cr);
+ cairo_clip(cr);*/
draw (button, cr);
cairo_destroy (cr);
diff --git a/src/play-button.h b/src/play-button.h
index 6bacac7..1f04562 100644
--- a/src/play-button.h
+++ b/src/play-button.h
@@ -46,11 +46,11 @@ typedef enum {
}PlayButtonState;
struct _PlayButtonClass {
- GtkDrawingAreaClass parent_class;
+ GtkEventBoxClass parent_class;
};
struct _PlayButton {
- GtkDrawingArea parent;
+ GtkEventBox parent;
};
GType play_button_get_type (void);