aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/play-button.c27
-rw-r--r--src/transport-widget.c10
2 files changed, 26 insertions, 11 deletions
diff --git a/src/play-button.c b/src/play-button.c
index 774b1e6..8962377 100644
--- a/src/play-button.c
+++ b/src/play-button.c
@@ -65,16 +65,6 @@ static void
play_button_init (PlayButton *self)
{
g_debug("PlayButton::play_button_init");
- GtkAllocation alloc;
-
- alloc.width = 100;
- alloc.height = 100;
- alloc.x = 0;
- alloc.y = 0;
-
- gtk_widget_set_allocation(GTK_WIDGET(self),
- &alloc);
- //g_free(alloc);
}
static void
@@ -92,9 +82,24 @@ play_button_finalize (GObject *object)
static gboolean
play_button_expose (GtkWidget *button, GdkEventExpose *event)
{
+ GtkAllocation alloc;
+
+ alloc.width = 200;
+ alloc.height = 600;
+ alloc.x = 100;
+ alloc.y = 100;
+
+ gtk_widget_set_allocation(GTK_WIDGET(button),
+ &alloc);
+
cairo_t *cr;
cr = gdk_cairo_create (button->window);
- cairo_rectangle (cr,
+
+ g_debug("PlayButton::Draw - width = %i", button->allocation.width);
+ g_debug("PlayButton::Draw - event->area.width = %i", event->area.width);
+ g_debug("PlayButton::Draw - event->area.x = %i", event->area.x);
+
+ cairo_rectangle (cr,
event->area.x, event->area.y,
event->area.width, event->area.height);
diff --git a/src/transport-widget.c b/src/transport-widget.c
index 07e7402..6ff3c04 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -89,6 +89,16 @@ transport_widget_init (TransportWidget *self)
priv->play_button = play_button_new();
+ GtkAllocation alloc;
+
+ alloc.width = 200;
+ alloc.height = 600;
+ alloc.x = 100;
+ alloc.y = 0;
+
+ gtk_widget_set_allocation(GTK_WIDGET(priv->play_button),
+ &alloc);
+
gtk_box_pack_start (GTK_BOX (priv->hbox), priv->play_button, FALSE, FALSE, 0);
g_signal_connect(G_OBJECT(twin_item), "property-changed", G_CALLBACK(transport_widget_property_update), self);