From: Shawn O. Pearce Date: Fri, 22 Jun 2007 05:29:20 +0000 (-0400) Subject: git-gui: Start blame windows as tall as possible X-Git-Tag: v1.5.3-rc1~16^2~39 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c1fd897a25d85424a2ee93a8ae2eb247ba7c2558;p=git.git git-gui: Start blame windows as tall as possible Most users these days are using a windowing system attached to a monitor that has more than 600 pixels worth of vertical space available for application use. As most files stored by Git are longer than they are wide (have more lines than columns) we want to dedicate as much vertical space as we can to the viewer. Instead of always starting the window at ~600 pixels high we now start the window 100 pixels shorter than the screen claims it has available to it. This -100 rule is used because some popular OSen add menu bars at the top of the monitor, and docks on the bottom (e.g. Mac OS X, CDE, KDE). We want to avoid making our window too big and causing the window's resize control from being out of reach of the user. Signed-off-by: Shawn O. Pearce --- diff --git a/lib/blame.tcl b/lib/blame.tcl index b52365481..77abd8291 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -304,8 +304,9 @@ constructor new {i_commit i_path} { set req_w [winfo reqwidth $top] set req_h [winfo reqheight $top] + set scr_h [expr {[winfo screenheight $top] - 100}] if {$req_w < 600} {set req_w 600} - if {$req_h < 400} {set req_h 400} + if {$req_h < $scr_h} {set req_h $scr_h} set g "${req_w}x${req_h}" wm geometry $top $g update