universal-access: Fix empty panel with newer GTK+
There's very few chances that the universal-access will fit in the minimum height of the shell for panels, so just nuke that. This also fixes the panel taking 1px in height until we switch away from it and back to it. https://bugzilla.gnome.org/show_bug.cgi?id=761939
This commit is contained in:
parent
22e463a4ce
commit
82fce2e0ff
1 changed files with 1 additions and 18 deletions
|
@ -852,22 +852,6 @@ cc_ua_panel_init_mouse (CcUaPanel *self)
|
|||
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
on_content_size_changed (GtkWidget *content, GtkAllocation *allocation, GtkWidget *panel)
|
||||
{
|
||||
if (allocation->height < SCROLL_HEIGHT)
|
||||
{
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (panel),
|
||||
GTK_POLICY_NEVER, GTK_POLICY_NEVER);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (panel),
|
||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (panel), SCROLL_HEIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
cc_ua_panel_init (CcUaPanel *self)
|
||||
{
|
||||
|
@ -905,8 +889,7 @@ cc_ua_panel_init (CcUaPanel *self)
|
|||
panel = WID ("universal_access_panel");
|
||||
content = WID ("universal_access_content");
|
||||
|
||||
g_signal_connect (content, "size-allocate",
|
||||
G_CALLBACK (on_content_size_changed), panel);
|
||||
gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (panel), SCROLL_HEIGHT);
|
||||
|
||||
priv->focus_adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (panel));
|
||||
gtk_container_set_focus_vadjustment (GTK_CONTAINER (content), priv->focus_adjustment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue