Re: Changing the look of the GtkTreeView



Arnaud Charlet <charlet ACT-Europe FR> writes:
> I was wondering how you can change the look and feel of the
> GtkTreeView. In particular, I'd like to use the standard
> +/- icons to open/close a tree, have lines drawn vertically between
> items, and change the rectangles by custom icons. All the kind of basic
> things that was easy to do with Ctree in short.
> 
> How is this possible with the TreeView ?

Those features of CTree were much-hated; we even coined the term
"ctree_set_expander_style() API" to describe a function that apps have
no business calling because it pointlessly hardcodes some aspect of
look-and-feel that should be the same across all apps.

With TreeView all that kind of stuff is a function of the theme or a
function of other user configuration.

> Subsidiary question: why has it been decided to use this new default
> look and feel (strange rectangles, and no links between items) ? Seems
> less user friendly and less intuitive than the Ctree default to me, but
> if there are good reasons, I'd be interested to know about them.

I wasn't involved in these decisions, but step back and think about
it; even if you disagree with the decision, it's nonsense to change it
on the application level. It should be changed for all apps or not at
all. Thus we consider ctree_set_expander_style() sort of APIs to be
broken and wrong; they lead to application inconsistency.

Having half the apps one way and half a different way is plainly
inferior to having either of the ways deployed consistently, no matter
which way you think is best.

If you don't like the default way the right thing is to change your
theme to one you like, or if the feature isn't themeable change GTK so
that it is.

Havoc





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