Forgotten files

This commit is contained in:
Matthias Clasen 2010-11-25 12:50:17 -05:00 committed by Carlos Garnacho
parent 757837b611
commit e374f7e4b5
2 changed files with 21 additions and 24 deletions

View File

@ -252,7 +252,7 @@ gtk_offscreen_box_realize (GtkWidget *widget)
{
GtkOffscreenBox *offscreen_box = GTK_OFFSCREEN_BOX (widget);
GtkAllocation allocation, child_area;
GtkStyle *style;
GtkStyleContext *context;
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
@ -346,10 +346,10 @@ gtk_offscreen_box_realize (GtkWidget *widget)
G_CALLBACK (offscreen_window_from_parent2), offscreen_box);
gtk_widget_style_attach (widget);
style = gtk_widget_get_style (widget);
gtk_style_set_background (style, window, GTK_STATE_NORMAL);
gtk_style_set_background (style, offscreen_box->offscreen_window1, GTK_STATE_NORMAL);
gtk_style_set_background (style, offscreen_box->offscreen_window2, GTK_STATE_NORMAL);
context = gtk_widget_get_style_context (widget);
gtk_style_context_set_background (context, window);
gtk_style_context_set_background (context, offscreen_box->offscreen_window1);
gtk_style_context_set_background (context, offscreen_box->offscreen_window2);
gdk_window_show (offscreen_box->offscreen_window1);
gdk_window_show (offscreen_box->offscreen_window2);
@ -672,12 +672,11 @@ gtk_offscreen_box_draw (GtkWidget *widget,
}
else if (gtk_cairo_should_draw_window (cr, offscreen_box->offscreen_window1))
{
gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
widget, "blah",
0, 0,
gdk_window_get_width (offscreen_box->offscreen_window1),
gdk_window_get_height (offscreen_box->offscreen_window1));
gtk_render_background (gtk_widget_get_style_context (widget), cr,
0, 0,
gdk_window_get_width (offscreen_box->offscreen_window1),
gdk_window_get_height (offscreen_box->offscreen_window1));
if (offscreen_box->child1)
gtk_container_propagate_draw (GTK_CONTAINER (widget),
@ -686,12 +685,10 @@ gtk_offscreen_box_draw (GtkWidget *widget,
}
else if (gtk_cairo_should_draw_window (cr, offscreen_box->offscreen_window2))
{
gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
widget, "blah",
0, 0,
gdk_window_get_width (offscreen_box->offscreen_window2),
gdk_window_get_height (offscreen_box->offscreen_window2));
gtk_render_background (gtk_widget_get_style_context (widget), cr,
0, 0,
gdk_window_get_width (offscreen_box->offscreen_window2),
gdk_window_get_height (offscreen_box->offscreen_window2));
if (offscreen_box->child2)
gtk_container_propagate_draw (GTK_CONTAINER (widget),

View File

@ -236,23 +236,23 @@ create_widget_visible_border (const char *text)
GtkWidget *inner_box;
GtkWidget *test_widget;
GtkWidget *label;
GdkColor color;
GdkRGBA color;
outer_box = gtk_event_box_new ();
gdk_color_parse ("black", &color);
gtk_widget_modify_bg (outer_box, GTK_STATE_NORMAL, &color);
gdk_rgba_parse (&color, "black");
gtk_widget_override_background_color (outer_box, 0, &color);
inner_box = gtk_event_box_new ();
gtk_container_set_border_width (GTK_CONTAINER (inner_box), 5);
gdk_color_parse ("blue", &color);
gtk_widget_modify_bg (inner_box, GTK_STATE_NORMAL, &color);
gdk_rgba_parse (&color, "blue");
gtk_widget_override_background_color (inner_box, 0, &color);
gtk_container_add (GTK_CONTAINER (outer_box), inner_box);
test_widget = gtk_event_box_new ();
gdk_color_parse ("red", &color);
gtk_widget_modify_bg (test_widget, GTK_STATE_NORMAL, &color);
gdk_rgba_parse (&color, "red");
gtk_widget_override_background_color (test_widget, 0, &color);
gtk_container_add (GTK_CONTAINER (inner_box), test_widget);