(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:
Ettore Perazzoli
2003-01-23 21:45:03 +00:00
parent 1b44ee08d8
commit eba0af0c6a
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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;
}