Commit 71b70b37 authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte
Browse files

Removed use of deprecated gtk_widget_get_style() function

and hardcoded dark and light colors since we are already using a pixmap for the background
parent 15f08f07
......@@ -360,17 +360,8 @@ glade_placeholder_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
static gboolean
glade_placeholder_draw (GtkWidget *widget, cairo_t *cr)
{
GtkStyle *style;
GdkColor *light;
GdkColor *dark;
gint w, h;
style = gtk_widget_get_style (widget);
light = &style->light[GTK_STATE_NORMAL];
dark = &style->dark[GTK_STATE_NORMAL];
h = gtk_widget_get_allocated_height (widget);
w = gtk_widget_get_allocated_width (widget);
gint h = gtk_widget_get_allocated_height (widget) - 1;
gint w = gtk_widget_get_allocated_width (widget) - 1;
if (placeholder_pattern)
{
......@@ -381,12 +372,21 @@ glade_placeholder_draw (GtkWidget *widget, cairo_t *cr)
cairo_restore (cr);
}
cairo_translate (cr, .5, .5);
cairo_set_line_width (cr, 1.0);
glade_utils_cairo_draw_line (cr, light, 0, 0, w - 1, 0);
glade_utils_cairo_draw_line (cr, light, 0, 0, 0, h - 1);
glade_utils_cairo_draw_line (cr, dark, 0, h - 1, w - 1, h - 1);
glade_utils_cairo_draw_line (cr, dark, w - 1, 0, w - 1, h - 1);
/* We hardcode colors here since we are already using an image as bg pattern */
cairo_set_source_rgb (cr, .9, .9, .9);
cairo_move_to (cr, w, 0);
cairo_line_to (cr, 0, 0);
cairo_line_to (cr, 0, h);
cairo_stroke (cr);
cairo_set_source_rgb (cr, .64, .64, .64);
cairo_move_to (cr, w, 0);
cairo_line_to (cr, w, h);
cairo_line_to (cr, 0, h);
cairo_stroke (cr);
return FALSE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment