aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-09-07 19:01:38 +0100
committerConor Curran <conor.curran@canonical.com>2010-09-07 19:01:38 +0100
commit3461e88ae36e6237ad20b7e9c8069b364974fdd0 (patch)
tree38ce34918147f9bfa5f833bb5c58f671cf64b8ea
parent41b5b22e56892b7246f5bcfc270d685f052c0f70 (diff)
downloadayatana-indicator-sound-3461e88ae36e6237ad20b7e9c8069b364974fdd0.tar.gz
ayatana-indicator-sound-3461e88ae36e6237ad20b7e9c8069b364974fdd0.tar.bz2
ayatana-indicator-sound-3461e88ae36e6237ad20b7e9c8069b364974fdd0.zip
alloc stuff
-rw-r--r--src/title-widget.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/title-widget.c b/src/title-widget.c
index d34dc7f..0315a8e 100644
--- a/src/title-widget.c
+++ b/src/title-widget.c
@@ -110,13 +110,14 @@ title_widget_init (TitleWidget *self)
g_debug("title widget init - icon pixel size = %i", gtk_image_get_pixel_size (GTK_IMAGE(icon)));
g_debug("title widget init - image pixel size = %i", gtk_image_get_pixel_size (image));
-
+
gtk_widget_set_size_request(icon, width
+ 5 /* ref triangle is 5x9 pixels */
+ 2 /* padding */,
height);
gtk_misc_set_alignment(GTK_MISC(icon), 1.0 /* right aligned */, 0.5);
- gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(self), GTK_WIDGET(image));
+
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(self), GTK_WIDGET(icon));
gtk_widget_show_all(icon);
GtkWidget* returned_image = gtk_image_menu_item_get_image(GTK_IMAGE_MENU_ITEM(self));
@@ -136,6 +137,23 @@ title_widget_init (TitleWidget *self)
g_object_get(GTK_WIDGET(self), "use-stock", use_stock, NULL );
g_object_get(GTK_WIDGET(self), "always-show-image", show_image, NULL);
+
+ GtkAllocation new_alloc;
+ new_alloc.width = 16;
+ new_alloc.height = 16;
+ new_alloc.x = 16;
+ new_alloc.y = 16;
+
+ gtk_widget_set_allocation(icon, &new_alloc);
+
+ GtkAllocation alloc;
+ gtk_widget_get_allocation(icon, &alloc);
+
+ g_debug("title widget init - alloc for icon: width : %i, height : %i, x : %i and y : %i",
+ alloc.width,
+ alloc.height,
+ alloc.x,
+ alloc.y);
g_debug("title widget init : use-stock = %i and show image = %i", *use_stock, *show_image);
g_free(use_stock);