Re: simple widget to draw on ?


On Sun, 2008-03-02 at 13:33 -0500, Havoc Pennington wrote:

> I would maybe not add a new widget for this, but instead make
> GtkDrawingArea have a no-window mode. If you look at the GtkFixed
> source, it has conditional branches in realize() and size_allocate()
> depending on whether NO_WINDOW is set. DrawingArea could work the same
> way, seems like it would be a trivial patch.

That's a very nice idea. I have added a patch along these lines to bug

> (Though, I also wonder if there's a bug in either the use of
> DrawingArea or the theme shown in your screenshot; looking at the gtk
> code, the drawing area's background should be set on theme change and
> on realize, so maybe someone is painting over the theme background in
> the expose handler, or the theme just fails to handle drawing area, or
> something.)

I think the theme draws the notebook page in a lighter background color.
The background of the drawing area is drawn in the default background
color though.

Even if this is classified as a theme bug, it would still be nice to
provide a simple way to draw without introducing an extra output window.
If the patch attached to bug #519317 is accepted, GtkDrawingArea could
serve this purpose. It would have to be documented, but I can take care
of that.


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