diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-09-27 04:48:37 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-09-27 04:48:37 +0800 |
commit | 4af4836183f5f7cfe493b1212f792973e103da4a (patch) | |
tree | 8715894177ba17134715dd4722e392fbb36bbbcd | |
parent | e01f1c8e94568ec40ac35efc08ec440d71f363b2 (diff) | |
download | gsoc2013-epiphany-4af4836183f5f7cfe493b1212f792973e103da4a.tar gsoc2013-epiphany-4af4836183f5f7cfe493b1212f792973e103da4a.tar.gz gsoc2013-epiphany-4af4836183f5f7cfe493b1212f792973e103da4a.tar.bz2 gsoc2013-epiphany-4af4836183f5f7cfe493b1212f792973e103da4a.tar.lz gsoc2013-epiphany-4af4836183f5f7cfe493b1212f792973e103da4a.tar.xz gsoc2013-epiphany-4af4836183f5f7cfe493b1212f792973e103da4a.tar.zst gsoc2013-epiphany-4af4836183f5f7cfe493b1212f792973e103da4a.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.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/ephy-notebook.c | 14 |
2 files changed, 16 insertions, 7 deletions
@@ -1,3 +1,12 @@ +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. + 2005-09-21 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyUtils.cpp: 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); |