From a0592d3f5746b41c60fee71dd8d2d27b5c813907 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Wed, 10 Oct 2007 20:50:40 -0400 Subject: [PATCH] git-gui: Change main window layout to support wider screens The layout is changed to have the file lists at the left (Unstaged Changes at the top, Staged Changes below it) and the diff window at the right (with the commit area below it). +----------+---------------------+ | Unstaged | Diff area | | | | | | | | | | +----------+ | | Staged | | | +---------------------+ | | Commit area | | | | +----------+---------------------+ The advantages are: - The height of the file lists can be adjusted independently to fit the files that they contain. - The diff viewer is higher. On wide screens it is ok that the main window is now generally wider, too. Signed-off-by: Johannes Sixt Signed-off-by: Shawn O. Pearce --- git-gui.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/git-gui.sh b/git-gui.sh index 6b7bdbca21..07be97dd5c 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1658,8 +1658,8 @@ proc do_quit {} { # set cfg_geometry [list] lappend cfg_geometry [wm geometry .] - lappend cfg_geometry [lindex [.vpane sash coord 0] 1] - lappend cfg_geometry [lindex [.vpane.files sash coord 0] 0] + lappend cfg_geometry [lindex [.vpane sash coord 0] 0] + lappend cfg_geometry [lindex [.vpane.files sash coord 0] 1] if {[catch {set rc_geometry $repo_config(gui.geometry)}]} { set rc_geometry {} } @@ -2208,8 +2208,8 @@ pack .branch -side top -fill x # -- Main Window Layout # -panedwindow .vpane -orient vertical -panedwindow .vpane.files -orient horizontal +panedwindow .vpane -orient horizontal +panedwindow .vpane.files -orient vertical .vpane add .vpane.files -sticky nsew -height 100 -width 200 pack .vpane -anchor n -side top -fill both -expand 1 @@ -2231,7 +2231,6 @@ pack .vpane.files.index.title -side top -fill x pack .vpane.files.index.sx -side bottom -fill x pack .vpane.files.index.sy -side right -fill y pack $ui_index -side left -fill both -expand 1 -.vpane.files add .vpane.files.index -sticky nsew # -- Working Directory File List # @@ -2251,7 +2250,9 @@ pack .vpane.files.workdir.title -side top -fill x pack .vpane.files.workdir.sx -side bottom -fill x pack .vpane.files.workdir.sy -side right -fill y pack $ui_workdir -side left -fill both -expand 1 + .vpane.files add .vpane.files.workdir -sticky nsew +.vpane.files add .vpane.files.index -sticky nsew foreach i [list $ui_index $ui_workdir] { rmsel_tag $i @@ -2264,8 +2265,8 @@ unset i frame .vpane.lower -height 300 -width 400 frame .vpane.lower.commarea frame .vpane.lower.diff -relief sunken -borderwidth 1 -pack .vpane.lower.commarea -side top -fill x -pack .vpane.lower.diff -side bottom -fill both -expand 1 +pack .vpane.lower.diff -fill both -expand 1 +pack .vpane.lower.commarea -side bottom -fill x .vpane add .vpane.lower -sticky nsew # -- Commit Area Buttons @@ -2591,11 +2592,11 @@ catch { set gm $repo_config(gui.geometry) wm geometry . [lindex $gm 0] .vpane sash place 0 \ - [lindex [.vpane sash coord 0] 0] \ - [lindex $gm 1] + [lindex $gm 1] \ + [lindex [.vpane sash coord 0] 1] .vpane.files sash place 0 \ - [lindex $gm 2] \ - [lindex [.vpane.files sash coord 0] 1] + [lindex [.vpane.files sash coord 0] 0] \ + [lindex $gm 2] unset gm } -- 2.11.4.GIT