@matheusbsbs / matheus-bagliano / commits / 729a6f60dd
Fork 0

git-gui: Always offer scrollbars for branch lists.

Anytime we use a listbox to show branch names its possible for the listbox to exceed 10 entries (actually its probably very common). So we should always offer a scrollbar for the Y axis on these listboxes. I just forgot to add it when I defined them. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jan 26, 2007 at 04:16 UTC 729a6f60ddd0b3317c581a01687a32e585fa0c3e
1 file changed +13 -7
git-gui.sh
+13 -7
@@ -2129,16 +2129,19 @@ proc do_delete_branch {} {
2129 -font font_ui
2130 listbox $w.list.l \
2131 -height 10 \
2132 - -width 50 \
2132 + -width 70 \
2133 -selectmode extended \
2134 + -yscrollcommand [list $w.list.sby set] \
2135 -font font_ui
2136 foreach h $all_heads {
2137 if {$h ne $current_branch} {
2138 $w.list.l insert end $h
2139 }
2140 }
2140 - pack $w.list.l -fill both -pady 5 -padx 5
2141 - pack $w.list -fill both -pady 5 -padx 5
2141 + scrollbar $w.list.sby -command [list $w.list.l yview]
2142 + pack $w.list.sby -side right -fill y
2143 + pack $w.list.l -side left -fill both -expand 1
2144 + pack $w.list -fill both -expand 1 -pady 5 -padx 5
2145
2146 labelframe $w.validate \
2147 -text {Delete Only If} \
@@ -2510,8 +2513,9 @@ proc do_push_anywhere {} {
2513 -font font_ui
2514 listbox $w.source.l \
2515 -height 10 \
2513 - -width 50 \
2516 + -width 70 \
2517 -selectmode extended \
2518 + -yscrollcommand [list $w.source.sby set] \
2519 -font font_ui
2520 foreach h $all_heads {
2521 $w.source.l insert end $h
@@ -2519,8 +2523,10 @@ proc do_push_anywhere {} {
2523 $w.source.l select set end
2524 }
2525 }
2522 - pack $w.source.l -fill both -pady 5 -padx 5
2523 - pack $w.source -fill both -pady 5 -padx 5
2526 + scrollbar $w.source.sby -command [list $w.source.l yview]
2527 + pack $w.source.sby -side right -fill y
2528 + pack $w.source.l -side left -fill both -expand 1
2529 + pack $w.source -fill both -expand 1 -pady 5 -padx 5
2530
2531 labelframe $w.dest \
2532 -text {Destination Repository} \
@@ -2782,7 +2788,7 @@ proc do_local_merge {} {
2788 -font font_ui
2789 listbox $w.source.l \
2790 -height 10 \
2785 - -width 25 \
2791 + -width 70 \
2792 -selectmode extended \
2793 -yscrollcommand [list $w.source.sby set] \
2794 -font font_ui