git-gui: Allow the user to control the blame/commit split point
commitd0b741dc08d1c036e0fbf68c72dda02545c39b85
authorShawn O. Pearce <spearce@spearce.org>
Fri, 1 Jun 2007 21:55:43 +0000 (1 17:55 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 6 Jun 2007 05:26:46 +0000 (6 01:26 -0400)
treefcfc7796ac76d8768456b8d05edf7c1f6895fca4
parent223475a77c36919942c92f66c87b1e772a0ee2af
git-gui: Allow the user to control the blame/commit split point

At one point I tried to present the blame viewer to an audience of
people on a 640 by 480 pixel LCD projector.  This did not work at
all as the top area (the file data) was taking up all of the screen
realestate and the split point was not adjustable by the user.  In
general locking the user into a specific ratio of display is just
not user friendly.

So we now place a split pane control into the middle of our blame
window, so the user can adjust it to their current needs.  If the
window increases (or decreases) in height we assign the difference
to the file data area, as that is generally the area of the window
that users are trying to see more of when they grow the window.

Unfortunately there appears to be a bug in the "pack" layout manager
in Tcl/Tk 8.4.1.  The status bar and the lower commit pane was being
squashed if the window decreased in height.  I think the pack manager
was just not decreasing the size of the panedwindow slave properly if
the main window shrank.  Switching to the "grid" layout manager fixes
the problem, but is slightly uglier setup code.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/blame.tcl