window: make the sidelist and first headerbar horizontally equal
The first headerbar and the sidelist should stay synchronized, and this commit does so by setting the width request of the headerbar to the allocated width of the sidelist. https://bugzilla.gnome.org/show_bug.cgi?id=766922
This commit is contained in:
parent
c0bdc06d1e
commit
a267ebd9a2
2 changed files with 11 additions and 0 deletions
|
@ -898,6 +898,15 @@ stack_page_notify_cb (GtkStack *stack,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
sidelist_size_allocate_cb (GtkWidget *box,
|
||||
GdkRectangle *allocation,
|
||||
CcWindow *self)
|
||||
{
|
||||
/* Keep the sidelist and the first headerbar synchronized */
|
||||
gtk_widget_set_size_request (self->header, allocation->width, -1);
|
||||
}
|
||||
|
||||
/* CcShell implementation */
|
||||
static void
|
||||
_shell_embed_widget_in_header (CcShell *shell,
|
||||
|
@ -1197,6 +1206,7 @@ cc_window_class_init (CcWindowClass *klass)
|
|||
gtk_widget_class_bind_template_callback (widget_class, gdk_window_set_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, search_entry_changed_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, search_entry_key_press_event_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, sidelist_size_allocate_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, stack_page_notify_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, window_map_event_cb);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue