forked from AuroraMiddleware/gtk
treeview: don't call gtk_style_context_set_background()
This commit is contained in:
parent
18be2d697c
commit
15908cfdf9
@ -9482,7 +9482,6 @@ static void
|
|||||||
text_window_realize (GtkTextWindow *win,
|
text_window_realize (GtkTextWindow *win,
|
||||||
GtkWidget *widget)
|
GtkWidget *widget)
|
||||||
{
|
{
|
||||||
GtkStyleContext *context;
|
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
GdkWindowAttr attributes;
|
GdkWindowAttr attributes;
|
||||||
gint attributes_mask;
|
gint attributes_mask;
|
||||||
@ -9533,8 +9532,6 @@ text_window_realize (GtkTextWindow *win,
|
|||||||
|
|
||||||
gdk_window_show (win->bin_window);
|
gdk_window_show (win->bin_window);
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (widget);
|
|
||||||
|
|
||||||
switch (win->type)
|
switch (win->type)
|
||||||
{
|
{
|
||||||
case GTK_TEXT_WINDOW_TEXT:
|
case GTK_TEXT_WINDOW_TEXT:
|
||||||
|
@ -597,8 +597,6 @@ static gint gtk_tree_view_focus (GtkWidget *widget,
|
|||||||
GtkDirectionType direction);
|
GtkDirectionType direction);
|
||||||
static void gtk_tree_view_grab_focus (GtkWidget *widget);
|
static void gtk_tree_view_grab_focus (GtkWidget *widget);
|
||||||
static void gtk_tree_view_style_updated (GtkWidget *widget);
|
static void gtk_tree_view_style_updated (GtkWidget *widget);
|
||||||
static void gtk_tree_view_state_flags_changed (GtkWidget *widget,
|
|
||||||
GtkStateFlags previous_state);
|
|
||||||
|
|
||||||
/* container signals */
|
/* container signals */
|
||||||
static void gtk_tree_view_remove (GtkContainer *container,
|
static void gtk_tree_view_remove (GtkContainer *container,
|
||||||
@ -981,7 +979,6 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
|
|||||||
widget_class->focus = gtk_tree_view_focus;
|
widget_class->focus = gtk_tree_view_focus;
|
||||||
widget_class->grab_focus = gtk_tree_view_grab_focus;
|
widget_class->grab_focus = gtk_tree_view_grab_focus;
|
||||||
widget_class->style_updated = gtk_tree_view_style_updated;
|
widget_class->style_updated = gtk_tree_view_style_updated;
|
||||||
widget_class->state_flags_changed = gtk_tree_view_state_flags_changed;
|
|
||||||
widget_class->queue_draw_region = gtk_tree_view_queue_draw_region;
|
widget_class->queue_draw_region = gtk_tree_view_queue_draw_region;
|
||||||
|
|
||||||
/* GtkContainer signals */
|
/* GtkContainer signals */
|
||||||
@ -2344,17 +2341,6 @@ gtk_tree_view_unmap (GtkWidget *widget)
|
|||||||
_gtk_pixel_cache_unmap (tree_view->priv->pixel_cache);
|
_gtk_pixel_cache_unmap (tree_view->priv->pixel_cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_tree_view_ensure_background (GtkTreeView *tree_view)
|
|
||||||
{
|
|
||||||
GtkStyleContext *context;
|
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
|
|
||||||
|
|
||||||
gtk_style_context_set_background (context, gtk_widget_get_window (GTK_WIDGET (tree_view)));
|
|
||||||
gtk_style_context_set_background (context, tree_view->priv->header_window);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_tree_view_bin_window_invalidate_handler (GdkWindow *window,
|
gtk_tree_view_bin_window_invalidate_handler (GdkWindow *window,
|
||||||
cairo_region_t *region)
|
cairo_region_t *region)
|
||||||
@ -2471,8 +2457,6 @@ gtk_tree_view_realize (GtkWidget *widget)
|
|||||||
&attributes, attributes_mask);
|
&attributes, attributes_mask);
|
||||||
gtk_widget_register_window (widget, tree_view->priv->header_window);
|
gtk_widget_register_window (widget, tree_view->priv->header_window);
|
||||||
|
|
||||||
gtk_tree_view_ensure_background (tree_view);
|
|
||||||
|
|
||||||
tmp_list = tree_view->priv->children;
|
tmp_list = tree_view->priv->children;
|
||||||
while (tmp_list)
|
while (tmp_list)
|
||||||
{
|
{
|
||||||
@ -8720,8 +8704,6 @@ gtk_tree_view_style_updated (GtkWidget *widget)
|
|||||||
|
|
||||||
if (gtk_widget_get_realized (widget))
|
if (gtk_widget_get_realized (widget))
|
||||||
{
|
{
|
||||||
gtk_tree_view_ensure_background (tree_view);
|
|
||||||
|
|
||||||
gtk_tree_view_set_grid_lines (tree_view, tree_view->priv->grid_lines);
|
gtk_tree_view_set_grid_lines (tree_view, tree_view->priv->grid_lines);
|
||||||
gtk_tree_view_set_enable_tree_lines (tree_view, tree_view->priv->tree_lines_enabled);
|
gtk_tree_view_set_enable_tree_lines (tree_view, tree_view->priv->tree_lines_enabled);
|
||||||
}
|
}
|
||||||
@ -15973,16 +15955,6 @@ gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view,
|
|||||||
gtk_widget_queue_resize (GTK_WIDGET (tree_view));
|
gtk_widget_queue_resize (GTK_WIDGET (tree_view));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_tree_view_state_flags_changed (GtkWidget *widget,
|
|
||||||
GtkStateFlags previous_state)
|
|
||||||
{
|
|
||||||
if (gtk_widget_get_realized (widget))
|
|
||||||
gtk_tree_view_ensure_background (GTK_TREE_VIEW (widget));
|
|
||||||
|
|
||||||
gtk_widget_queue_draw (widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_tree_view_get_grid_lines:
|
* gtk_tree_view_get_grid_lines:
|
||||||
* @tree_view: a #GtkTreeView
|
* @tree_view: a #GtkTreeView
|
||||||
|
Loading…
Reference in New Issue
Block a user