Re: GTK+ Theming improvements



On Fri, 2007-08-31 at 21:41 +0200, Milosz Derezynski wrote:

> On 8/31/07, Peter Clifton <pcjc2 cam ac uk> wrote:
> >
> > On Fri, 2007-08-31 at 20:09 +0200, Milosz Derezynski wrote:
> > > Hey Alberto,
> > >
> > > I thought about it further and it would be also possible with the
> > > current Gtk+; the outer buttons would just need to render themselves
> > > in a different way, and with current API and internals, the API user
> > > would need to make sure of that; furthermore give the box a spacing of
> > > 0px, and then it should (almost) work.
> > >
> > > Almost, because each button would still draw a border for itself, so
> > > the border between the inner buttons wouldn't look exactly the same,
> > > as in the mockup.
> >
> > Could a sensible (IE - like it is at present) tree-view header be
> > constructed out of similarly conjoined buttons, or is there further
> > themeing required? (Assuming we could switch off the corner rounding and
> > pre-lighting at will).
> 

> Nope. That's what Aaron's post is all about:
> http://abock.org/2007/07/02/suboptimal-theming-in-gtk/

I didn't mean is it possible with the current code, rather - would
getting support for "conjoined" widgets provide a sufficient interface
for drawing tree view headers.

Whilst the widgets don't know about rounding, the application programmer
is in a unique position to specify via some API or "hint" that widgets
belong together. (I think this is much less the case in the button
example posted actually though, that case would be a theme decision I
believe).

By specifying - either at the theme level, or widget implementation /
application level, that a particular widget expects to be drawn closely
against another one should be enough to control the spacings and corner
rounding.

At the application (or widget implementation) level, we might add a flag
to a button which makes it expect to be packed tight against another
widget. This would turn off rounding on those tightly packed sides.
Perhaps this hinting could be a properly of the container widgets were
being packed into.

My question was... is this enough to do everything a tree-view header
special-cases? I'm not familiar with that widget's code.

Kind regards,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)




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