> On Fri, 2010-10-01 at 15:06 +0000, David Barth wrote: > > +static gchar * > > +get_current_font_name () > > +{ > > + GtkSettings *settings = gtk_settings_get_default(); > > + gchar *font_name; > > + > > + g_object_get (settings, "gtk-font-name", &font_name, NULL); > > + > > + return font_name; > > +} > > + > > +static gint > > +get_current_font_size (gchar *font_name) > > +{ > > + gint font_size; > > + PangoFontDescription *font_description; > > + > > + font_description = pango_font_description_from_string (font_name); > > + font_size = pango_font_description_get_size (font_description); > > + > > + return font_size / PANGO_SCALE; > > +} > > + > > I'm curious why you're getting these from the global GTK defaults and > not from the widget information. For instance, if the widget style was > different in the panel it seems like those settings would not get > inherited.
True, just use gtk_widget_get_settings (*widget). Could you do that when you merge? > > > - gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height); > > - > > - GtkWidget * icon = > gtk_image_new_from_icon_name(dbusmenu_menuitem_property_get(newitem, > APPLICATION_MENUITEM_PROP_ICON), GTK_ICON_SIZE_MENU); > > - 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_icon_size_lookup(design_team_size, &width, &height); > > + > > + GtkWidget * icon = > gtk_image_new_from_icon_name(dbusmenu_menuitem_property_get(newitem, > APPLICATION_MENUITEM_PROP_ICON), design_team_size); > > + > > + gtk_widget_set_size_request(icon, width, height); > > + /* Not needed if you remove the padding, I guess > > + gtk_misc_set_alignment(GTK_MISC(icon), 0.5, 0); */ > > It seems like this will create cases where there is no spacing between > the arrow and the icon. It seems like there needs to be *some* spacing, > otherwise it will look too crowded. Mark wants no space between the icon and the triangle, just like unity! -- https://code.launchpad.net/~cimi/indicator-messages/fixes-to-right-label-and-icon-dimension/+merge/37272 Your team ayatana-commits is subscribed to branch lp:indicator-messages. _______________________________________________ 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