forked from AuroraMiddleware/gtk
Hide GtkTreeViewColumn buttons when header_window is not visible
This commit is contained in:
parent
26173c7864
commit
31536736ea
@ -2128,6 +2128,9 @@ gtk_tree_view_map_buttons (GtkTreeView *tree_view)
|
||||
column = list->data;
|
||||
button = gtk_tree_view_column_get_button (column);
|
||||
|
||||
if (gtk_tree_view_column_get_visible (column) && button)
|
||||
gtk_widget_show_now (button);
|
||||
|
||||
if (gtk_widget_get_visible (button) &&
|
||||
!gtk_widget_get_mapped (button))
|
||||
gtk_widget_map (button);
|
||||
@ -11631,6 +11634,8 @@ gtk_tree_view_set_headers_visible (GtkTreeView *tree_view,
|
||||
{
|
||||
column = list->data;
|
||||
button = gtk_tree_view_column_get_button (column);
|
||||
|
||||
gtk_widget_hide (button);
|
||||
gtk_widget_unmap (button);
|
||||
}
|
||||
gdk_window_hide (tree_view->priv->header_window);
|
||||
|
@ -987,7 +987,9 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column)
|
||||
{
|
||||
if (priv->visible)
|
||||
{
|
||||
if (gdk_window_is_visible (_gtk_tree_view_get_header_window (GTK_TREE_VIEW (priv->tree_view))))
|
||||
gtk_widget_show_now (priv->button);
|
||||
|
||||
if (priv->window)
|
||||
{
|
||||
if (priv->resizable)
|
||||
@ -1327,9 +1329,6 @@ _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column)
|
||||
g_return_if_fail (_gtk_tree_view_get_header_window (tree_view) != NULL);
|
||||
gtk_widget_set_parent_window (priv->button, _gtk_tree_view_get_header_window (tree_view));
|
||||
|
||||
if (priv->visible)
|
||||
gtk_widget_show (priv->button);
|
||||
|
||||
attr.window_type = GDK_WINDOW_CHILD;
|
||||
attr.wclass = GDK_INPUT_ONLY;
|
||||
attr.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
|
||||
|
Loading…
Reference in New Issue
Block a user