Update of /cvsroot/gtk-wimp/gtk-wimp/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15200/src
Modified Files:
msw_style.c
Log Message:
steal handle drawing code from wimpose95
Index: msw_style.c
===================================================================
RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** msw_style.c 27 Jun 2005 14:54:40 -0000 1.25
--- msw_style.c 28 Jun 2005 14:33:52 -0000 1.26
***************
*** 1957,1971 ****
return;
}
! /* grippers are just flat boxes when they're not a toolbar */
! parent_class->draw_box (style, window, state_type, shadow_type,
! area, widget, detail, x, y, width, height);
}
! else if (!GTK_IS_PANED (widget))
{
! /* TODO: Draw handle boxes as double lines: || */
! parent_class->draw_handle (style, window, state_type, shadow_type,
! area, widget, detail, x, y, width, height,
! orientation);
}
}
--- 1957,2013 ----
return;
}
+ }
! if (!GTK_IS_PANED(widget)) {
! gint xx, yy;
! gint xthick, ythick;
! GdkGC *light_gc, *dark_gc;
! GdkRectangle dest;
!
! if ((width == -1) && (height == -1))
! gdk_window_get_size(window, &width, &height);
! else if (width == -1)
! gdk_window_get_size(window, &width, NULL);
! else if (height == -1)
! gdk_window_get_size(window, NULL, &height);
!
! gtk_paint_box(style, window, state_type, shadow_type, area, widget,
! detail, x, y, width, height);
!
! light_gc = style->light_gc[state_type];
! dark_gc = style->dark_gc[state_type];
!
! xthick = style->xthickness;
! ythick = style->ythickness;
!
! dest.x = x + xthick;
! dest.y = y + ythick;
! dest.width = width - (xthick * 2);
! dest.height = height - (ythick * 2);
!
! gdk_gc_set_clip_rectangle(light_gc, &dest);
! gdk_gc_set_clip_rectangle(dark_gc, &dest);
!
! if (orientation == GTK_ORIENTATION_VERTICAL)
! {
! yy = y + ythick;
! for (xx = x + xthick; xx < (x + width - xthick); xx += 6)
! {
! gdk_draw_line(window, light_gc, xx, yy, xx, yy + height - ythick);
! gdk_draw_line(window, dark_gc, xx + 1, yy, xx + 1, yy + height - ythick);
!
! gdk_draw_line(window, light_gc, xx + 3, yy, xx + 3, yy + height - ythick);
! gdk_draw_line(window, dark_gc, xx + 4, yy, xx + 4, yy + height - ythick);
! }
}
! else
{
! draw_hline(style, window, state_type, area, widget, detail,
! x, x+width, y+1);
! draw_hline(style, window, state_type, area, widget, detail,
! x, x+width, y+3);
! }
! gdk_gc_set_clip_rectangle(light_gc, NULL);
! gdk_gc_set_clip_rectangle(dark_gc, NULL);
}
}
|