Re: [gtk-list] Calculating the clint area size




Robert Roebling wrote:
> I need to calculate the size of a window, which is actually
> visible on screen and not (partially) covered by borders.
> scrollbars or any other areas I cannot draw on.

> When using a simple widget, this can (I think) be achieved
> by subtracting klass->xthickness from the actual size
> of the widget.

* 2.

Note that containers have a border_width resource...

> But I also have a ScrolledWidget. This widget may have
> scrollbars or may not have any. It contains a client area
> (aka viewport) which can have the style sunken_in,
> sunken_out or sunken_none.

Scrolled_window is a bit more tricky.
There is a bug in the viewport (at least it was there in 0.99.0)
in the size allocate function. if the viewport->shadow_type is
SHADOW_NONE,  the window is not resized correctly (it just 
doesn't draw the shadows). I posted a patch to fixed that some
days ago. 

The big problem in scrolled_window is that the space between
the scrollbar and the viewport is a define (a not a resource).
I made a patch to change that (replacing the define with a
resource which is more logical), but I didn't send it.
I'll post it tomorrow.
(FYI the define is 5 :) ).


Patrice.



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