forked from AuroraMiddleware/gtk
headerbar: don't throw a warning if title widget is hidden
commit 0015ebc4a8
reworked
some of the titlebar size allocation code. Those changes
inadvertently introduced a warning when the application sets
the headerbar title widget to be hidden.
This commit fixes that warning.
https://bugzilla.gnome.org/show_bug.cgi?id=768184
This commit is contained in:
parent
b480d9c2ed
commit
386d17db6d
@ -997,7 +997,7 @@ gtk_header_bar_allocate_contents (GtkCssGadget *gadget,
|
||||
gint nvis_children;
|
||||
gint title_minimum_size;
|
||||
gint title_natural_size;
|
||||
gboolean title_expands;
|
||||
gboolean title_expands = FALSE;
|
||||
gint start_width, end_width;
|
||||
gint uniform_expand_bonus[2] = { 0 };
|
||||
gint leftover_expand_bonus[2] = { 0 };
|
||||
@ -1051,13 +1051,15 @@ gtk_header_bar_allocate_contents (GtkCssGadget *gadget,
|
||||
title_widget = NULL;
|
||||
|
||||
if (title_widget)
|
||||
gtk_widget_get_preferred_width_for_height (title_widget,
|
||||
height,
|
||||
&title_minimum_size,
|
||||
&title_natural_size);
|
||||
width -= title_natural_size;
|
||||
{
|
||||
gtk_widget_get_preferred_width_for_height (title_widget,
|
||||
height,
|
||||
&title_minimum_size,
|
||||
&title_natural_size);
|
||||
width -= title_natural_size;
|
||||
|
||||
title_expands = gtk_widget_compute_expand (title_widget, GTK_ORIENTATION_HORIZONTAL);
|
||||
title_expands = gtk_widget_compute_expand (title_widget, GTK_ORIENTATION_HORIZONTAL);
|
||||
}
|
||||
|
||||
start_width = 0;
|
||||
if (priv->titlebar_start_box != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user