@matheusbsbs / matheus-bagliano / commits / 3e7b0e1d0a
Fork 0

git-gui: Display status on left in diff header.

Because the Tk pack layout manager gives all space to the right/bottom most widget during expand/contract of the frame we were adding and removing all space from the status area of the bar and not from the file name, which is what we actually wanted. A simple enough fix is to just put the status of the given file on the left side of the diff viewer header rather than on the right. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Nov 12, 2006 at 22:06 UTC 3e7b0e1d0ae509a54ca61c2b4c4990c8e6f0b2c0
1 file changed +10 -12
git-gui
+10 -12
@@ -2281,6 +2281,13 @@ bind_button3 $ui_comm "tk_popup $ui_comm.ctxm %X %Y"
2281 set ui_fname_value {}
2282 set ui_fstatus_value {}
2283 frame .vpane.lower.diff.header -background orange
2284 +label .vpane.lower.diff.header.l4 \
2285 + -textvariable ui_fstatus_value \
2286 + -background orange \
2287 + -width $max_status_desc \
2288 + -anchor w \
2289 + -justify left \
2290 + -font font_ui
2291 label .vpane.lower.diff.header.l1 -text {File:} \
2292 -background orange \
2293 -font font_ui
@@ -2288,6 +2295,7 @@ set ui_fname .vpane.lower.diff.header.l2
2295 text $ui_fname \
2296 -background orange \
2297 -height 1 \
2298 + -wrap none \
2299 -relief flat \
2300 -state disabled \
2301 -font font_ui
@@ -2311,19 +2319,9 @@ proc $ui_fname.update {varname args} {
2319 $ui_fname insert end [escape_path $ui_fname_value]
2320 $ui_fname configure -state disabled
2321 }
2314 -label .vpane.lower.diff.header.l3 -text {Status:} \
2315 - -background orange \
2316 - -font font_ui
2317 -label .vpane.lower.diff.header.l4 -textvariable ui_fstatus_value \
2318 - -background orange \
2319 - -width $max_status_desc \
2320 - -anchor w \
2321 - -justify left \
2322 - -font font_ui
2322 +pack .vpane.lower.diff.header.l4 -side left
2323 pack .vpane.lower.diff.header.l1 -side left
2324 -pack .vpane.lower.diff.header.l2 -side left -fill x
2325 -pack .vpane.lower.diff.header.l4 -side right
2326 -pack .vpane.lower.diff.header.l3 -side right
2324 +pack $ui_fname -fill x
2325
2326 # -- Diff Body
2327 frame .vpane.lower.diff.body