From 57b6e5af1ace03e4ee13903cee881464ee051d24 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Sun, 3 Jul 2011 05:36:16 +0000 Subject: fix ellipsization on gtk2 1. a stupid copy/paste error 2. add a bit of room to our estimation of the natural size so things don't get ellipsized unnecessarily --- src/status-bar.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/status-bar.c b/src/status-bar.c index 6365505..6d4541b 100644 --- a/src/status-bar.c +++ b/src/status-bar.c @@ -56,11 +56,14 @@ uzbl_status_bar_size_allocate (GtkWidget *widget, left_natural_width = left_requisition_nat.width; #else - gtk_widget_size_request(status_bar->left_label, &left_requisition); - gtk_widget_size_request(status_bar->left_label, &right_requisition); + gtk_widget_size_request(status_bar->left_label, &left_requisition); + gtk_widget_size_request(status_bar->right_label, &right_requisition); PangoLayout *left_layout = gtk_label_get_layout(GTK_LABEL(status_bar->left_label)); pango_layout_get_pixel_size(left_layout, &left_natural_width, NULL); + + /* some kind of fudge factor seems to be needed here */ + left_natural_width += 16; #endif gtk_widget_set_allocation (widget, allocation); -- cgit v1.2.3