Commit 01dca52c authored by Nikita Churaev's avatar Nikita Churaev Committed by Carlos Soriano
Browse files

Fix path bar changing size when navigating

This was due to size differences between bold and regular labels. The
problems was that invisible widgets always return 0 when their size is
requested and Nautilus tried to request the width a regular label would
take from an invisible bold label with the same text. This patch fixes
this by showing the label before measuring it and hiding it afterwards.
parent bac9dfd0
Pipeline #7513 passed with stage
in 23 minutes and 14 seconds
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment