diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c index 630b8ed33a89010c963df1f22953a05839e58c1b..e6016b77c8caae856b6f8934e11457e1bc0f6704 100644 --- a/src/nautilus-pathbar.c +++ b/src/nautilus-pathbar.c @@ -480,7 +480,13 @@ set_label_size_request (ButtonData *button_data) } gtk_widget_get_preferred_size (button_data->label, NULL, &nat_req); + + /* We need to show the bold label first before measuring it, because + * invisible widgets always return 0 when their size is requested. + */ + gtk_widget_show (button_data->bold_label); gtk_widget_get_preferred_size (button_data->bold_label, &bold_req, NULL); + gtk_widget_hide (button_data->bold_label); width = MAX (nat_req.width, bold_req.width); width = MIN (width, NAUTILUS_PATH_BAR_BUTTON_MAX_WIDTH);