(get_max_clipped_label_width): Use
clipped_label->layout instead of creating a new PangoLayout; this way we respect the actual font being used. svn path=/trunk/; revision=19603
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
2003-01-23 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* e-shell-folder-title-bar.c (get_max_clipped_label_width): Use
|
||||
clipped_label->layout instead of creating a new PangoLayout; this
|
||||
way we respect the actual font being used.
|
||||
|
||||
2003-01-23 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* e-shell-view.c (create_label_for_empty_page): Update for new
|
||||
|
||||
@ -196,17 +196,11 @@ set_title_bar_label_style (GtkWidget *widget)
|
||||
static int
|
||||
get_max_clipped_label_width (EClippedLabel *clipped_label)
|
||||
{
|
||||
PangoLayout *layout;
|
||||
int width;
|
||||
|
||||
layout = gtk_widget_create_pango_layout (GTK_WIDGET (clipped_label),
|
||||
clipped_label->label);
|
||||
|
||||
pango_layout_get_pixel_size (layout, &width, NULL);
|
||||
pango_layout_get_pixel_size (clipped_label->layout, &width, NULL);
|
||||
width += 2 * GTK_MISC (clipped_label)->xpad;
|
||||
|
||||
g_object_unref (layout);
|
||||
|
||||
return width;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user