diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-09-27 04:48:17 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-09-27 04:48:17 +0800 |
commit | 5e3450ce9ad693b6c9cc987e4b606a48c399be2b (patch) | |
tree | 1036227ba2eee117a444d681a2d325aac9cec206 /src | |
parent | 2304764f197dc76a5b2fe80f682d906b3fa25eed (diff) | |
download | gsoc2013-epiphany-5e3450ce9ad693b6c9cc987e4b606a48c399be2b.tar gsoc2013-epiphany-5e3450ce9ad693b6c9cc987e4b606a48c399be2b.tar.gz gsoc2013-epiphany-5e3450ce9ad693b6c9cc987e4b606a48c399be2b.tar.bz2 gsoc2013-epiphany-5e3450ce9ad693b6c9cc987e4b606a48c399be2b.tar.lz gsoc2013-epiphany-5e3450ce9ad693b6c9cc987e4b606a48c399be2b.tar.xz gsoc2013-epiphany-5e3450ce9ad693b6c9cc987e4b606a48c399be2b.tar.zst gsoc2013-epiphany-5e3450ce9ad693b6c9cc987e4b606a48c399be2b.zip |
Use the tab label's outer hbox for the size calculation instead of the
2005-09-26 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-notebook.c: (tab_label_style_set_cb),
(build_tab_label):
Use the tab label's outer hbox for the size calculation instead
of the label itself. Fixes size oscillations with the Tab States
extension.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-notebook.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index af2b43689..55e458b5a 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -1036,23 +1036,23 @@ close_button_clicked_cb (GtkWidget *widget, GtkWidget *tab) } static void -tab_label_style_set_cb (GtkWidget *label, +tab_label_style_set_cb (GtkWidget *hbox, GtkStyle *previous_style, - GtkWidget *hbox) + gpointer user_data) { PangoFontMetrics *metrics; PangoContext *context; int char_width, h, w; - context = gtk_widget_get_pango_context (label); + context = gtk_widget_get_pango_context (hbox); metrics = pango_context_get_metrics (context, - label->style->font_desc, + hbox->style->font_desc, pango_context_get_language (context)); char_width = pango_font_metrics_get_approximate_digit_width (metrics); pango_font_metrics_unref (metrics); - gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (label), + gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (hbox), GTK_ICON_SIZE_MENU, &w, &h); gtk_widget_set_size_request @@ -1114,8 +1114,8 @@ build_tab_label (EphyNotebook *nb, EphyTab *tab) gtk_box_pack_start (GTK_BOX (label_hbox), label, TRUE, TRUE, 0); /* Set minimal size */ - g_signal_connect (label, "style-set", - G_CALLBACK (tab_label_style_set_cb), hbox); + g_signal_connect (hbox, "style-set", + G_CALLBACK (tab_label_style_set_cb), NULL); gtk_widget_show (hbox); gtk_widget_show (label_ebox); |