From: Koen D. <ko...@re...> - 2009-07-23 13:28:12
|
Harald Oehlmann wrote: > Hello BWidget community, > > Koen Danckaert proposes in BWidget patch 2825354 to revert a > modification on the tree widget (tree.tcl). > > Issue: > > Old (and proposed behaviour) : > - there is a vertical line from the top of the widget to the first node > ASCII-Arts: > +---- <- Tree Widget border > | | <- this line is the issue > | +--Node 1 > | | > | +--Node 2 > > Current behaviour: > - this line is not present > > Login entry to current behaviour: > > 2004-04-21 Jeff Hobbs <je...@Ac...> > * tree.tcl (_draw_subnodes): Adjust the drawing of the line to the > first root node to start at the vertical point (not go up). > > Addiditional explanation by Jeff: > > The reason I made that change was to be visually compatible with Windows > (older style, as new style is no lines) when you actually have sub-nodes > (the [+] and [-] indicators). The line to the top is then inconsistent > with the way others draw. > You could try and make that check contingent on whether subnodes exist, > but I think that may seem odd. My opinion is: - When the first node has subnodes, it does not really matter. Both styles look good visually. It may be inconsistent with some older Windows style, but as Jeff points out, the new Windows style is to draw no lines at all. So why would we still try to match the older style? - When the first node has no subnodes, it looks strange to have no line. - When there are only 1 or 2 nodes in the tree, it looks even more strange: pack [Tree .t -padx 2] .t insert end root node1 -text "Node 1" .t insert end root node2 -text "Node 2" ;# try with and without this line Of course, you could say that you never want a tree with only 1 node, but in one of our applications we let the user interactively create a tree, and in that case a tree with 1 node may be a necessary intermediate state. Making the line dependent on whether subnodes exist would also be strange: then the line will suddenly (dis)appear when subnodes are created/deleted in such an interactive application. --Koen |