From eba0af0c6a80d2027eb443202f101149f607a5ea Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 23 Jan 2003 21:45:03 +0000 Subject: [PATCH] (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 --- shell/ChangeLog | 6 ++++++ shell/e-shell-folder-title-bar.c | 8 +------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index 77e4b991b4..d217493014 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2003-01-23 Ettore Perazzoli + + * 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 * e-shell-view.c (create_label_for_empty_page): Update for new diff --git a/shell/e-shell-folder-title-bar.c b/shell/e-shell-folder-title-bar.c index 9b69d17098..7c6e2384d8 100644 --- a/shell/e-shell-folder-title-bar.c +++ b/shell/e-shell-folder-title-bar.c @@ -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; }