David Barth has proposed merging lp:~dbarth/indicator-me/lets-keep-it-simple into lp:indicator-me.
Requested reviews: Indicator Applet Developers (indicator-applet-developers) Getting back to the basics, of just fixing bug https://bugs.launchpad.net/bugs/550956 The frame improvements will be a Maverick thing. -- https://code.launchpad.net/~dbarth/indicator-me/lets-keep-it-simple/+merge/23402 Your team ayatana-commits is subscribed to branch lp:indicator-me.
=== modified file 'src/about-me-menu-item.c' --- src/about-me-menu-item.c 2010-04-01 23:14:13 +0000 +++ src/about-me-menu-item.c 2010-04-14 15:12:26 +0000 @@ -243,6 +243,16 @@ return TRUE; } +static void +image_size_allocate (GtkWidget *widget, + GtkAllocation *allocation, + gpointer user_data) +{ + gint max = MAX (allocation->width, allocation->height); + + gtk_widget_set_size_request (widget, max, max); +} + static GObject* about_me_menu_item_constructor (GType type, guint n_construct_properties, @@ -258,20 +268,23 @@ priv = GET_PRIVATE (object); - priv->label = gtk_label_new (priv->realname); - gdouble pixels_per_em = get_pixels_per_em (priv->label); + GtkWidget *frame = gtk_frame_new (NULL); + gdouble pixels_per_em = get_pixels_per_em (frame); GdkPixbuf *pixbuf = load_icon ("stock_person-panel", pixels_per_em * 3); if (pixbuf == NULL) pixbuf = load_icon ("stock_person", pixels_per_em * 3); priv->image = gtk_image_new_from_pixbuf (pixbuf); + g_signal_connect (frame, "size-allocate", G_CALLBACK (image_size_allocate), NULL); gtk_misc_set_padding (GTK_MISC (priv->image), 2, 2); + gtk_container_add (GTK_CONTAINER (frame), priv->image); align = gtk_alignment_new (0, 0.3, 0, 0); + priv->label = gtk_label_new (priv->realname); gtk_misc_set_padding (GTK_MISC (priv->label), 2, 2); gtk_container_add (GTK_CONTAINER (align), priv->label); hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), priv->image, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), align, TRUE, TRUE, DEFAULT_PIXELS_PER_EM); gtk_container_add (GTK_CONTAINER (object), hbox);
_______________________________________________ Mailing list: https://launchpad.net/~ayatana-commits Post to : ayatana-commits@lists.launchpad.net Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp