Re: Distinguish column header from normal button
- From: Todd Berman <tberman off net>
- To: Matthias Clasen <mclasen redhat com>
- Cc: Federico Mena Quintero <federico ximian com>, gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: Distinguish column header from normal button
- Date: Wed, 14 Sep 2005 10:02:55 -0700
On Wed, 2005-09-14 at 09:15 -0400, Matthias Clasen wrote:
> On Wed, 2005-09-14 at 09:29 +0200, Richard Stellingwerff wrote:
> > On 9/14/05, Federico Mena Quintero <federico ximian com> wrote:
> > > On Tue, 2005-09-13 at 23:45 +0200, Richard Stellingwerff wrote:
> > >
> > > > To distinguish Column headers from normal buttons, I check if its
> > > > parent is a GtkTreeView or a GtkCList. A horrible way, but afaik the
> > > > only way.
> > > > In order to properly distinguish a column header from a normal button,
> > > > I was thinking about setting a name on the column header button, using
> > > > gtk_widget_set_name. Perhaps something like "Header:First",
> > > > "Header:Middle", and "Header:Last".
> > >
> > > The right way to do it is to add a private API to GtkButton, so that the
> > > tree view can tell the button which hint to pass to the gtk_paint_*()
> > > functions. The theme engine will then use this hint to draw the proper
> > > box type for the tree column's buttons.
> >
> > By "hint," do you actually mean the 'detail' parameter that gets
> > passed on to gtk_paint_*()? Simply changing that would break a lot of
> > themes that currently don't know how to handle the new 'detail'.
>
> Themes that can't handle unkown details are already broken, just like
> themes that can't handle widget being NULL...
I think (but am not sure) that his point was that changing from passing
a detail of "button" with a widget->parent of either treeview or clist
to passing a detail of "gtk-treeview-header-right" or whatever, will
break current theme's treeview header rendering.
--Todd
PS - Sorry for the double post for some of you, still working out this
whole how-to-email issue :).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]