Frame around client window using theme-engine



HI

I've been working on a theme engine to mimic exactly the 
widgets used in cde. Starting from the 'notif' engine, it was
quite easy to make most of the widgets look exactly like 
cde, with some tweaking, like for instance sunken active menu items.
One thing I didn't get right yet though,
is the frame ('inset') drawn around the client area, as is
done in cde. Compare the two dialogs in the following image, 
to see what I mean:

http://www.xs4all.nl/~josvanr/inset.png

The first one shows the dialog as it would be produced by 
the (modified) notif engine, the second one shows the dialog
as displayed by cde. 

So what has to be done, is to draw a shadowed cadre around 
the entire client area. I tried to hack something into the 
engine like this, a function that is called once, that gets
a pointer to the root window and draws a frame:

{
  GdkWindow *top =  gdk_window_get_toplevel (window);
  GtkStyle * topstyle=gtk_widget_get_style(GTK_WIDGET(top));
  InsetDrawn=1;
  draw_shadow( topstyle, top, GTK_STATE_NORMAL,GTK_SHADOW_ETCHED_OUT, NULL,
                   NULL, NULL, 0, 0, -1, -1);
};

Unfortunately, it doesn't seem to work, nothing happens. 
Maybe an experienced theme engine writer on this list knows an 
easy way to do this.

best regards

jos








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]