Fossil SCM
Tk diff: Fix a couple scrollbar issues.
Commit
a6c96aea6b61f61a1d2bdebdb91e72cec8254681
Parent
01196ad38c48088…
1 file changed
+8
-7
+8
-7
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -766,11 +766,11 @@ | ||
| 766 | 766 | @ disableSync x |
| 767 | 767 | @ $col xview moveto [expr {$first*[xvis $col]/($last-$first)}] |
| 768 | 768 | @ foreach side {A B} { |
| 769 | 769 | @ set sb .sbx$side |
| 770 | 770 | @ set xview [.txt$side xview] |
| 771 | -@ if {$xview ne "0.0 1.0"} { | |
| 771 | +@ if {[lindex $xview 0] > 0 || [lindex $xview 1] < 1} { | |
| 772 | 772 | @ grid $sb |
| 773 | 773 | @ eval $sb set $xview |
| 774 | 774 | @ } else { |
| 775 | 775 | @ grid remove $sb |
| 776 | 776 | @ } |
| @@ -893,23 +893,24 @@ | ||
| 893 | 893 | @ |
| 894 | 894 | @ if {[readDiffs $cmd] == 0} { |
| 895 | 895 | @ tk_messageBox -type ok -title $CFG(TITLE) -message "No changes" |
| 896 | 896 | @ exit |
| 897 | 897 | @ } |
| 898 | +@ update idletasks | |
| 898 | 899 | @ |
| 899 | 900 | @ grid rowconfigure . 1 -weight 1 |
| 900 | 901 | @ grid columnconfigure . 1 -weight 1 |
| 901 | 902 | @ grid columnconfigure . 4 -weight 1 |
| 902 | -@ grid .files -columnspan 6 | |
| 903 | -@ eval grid [cols] .sby -sticky nsew | |
| 904 | -@ grid .sbxA -row 2 -column 0 -columnspan 2 -sticky ew | |
| 903 | +@ grid .files -row 0 -columnspan 6 | |
| 904 | +@ eval grid [cols] -row 1 -sticky nsew | |
| 905 | +@ grid .sby -row 1 -column 5 -sticky ns | |
| 906 | +@ grid .sbxA -row 2 -columnspan 2 -sticky ew | |
| 905 | 907 | @ grid .spacer -row 2 -column 2 |
| 906 | 908 | @ grid .sbxB -row 2 -column 3 -columnspan 2 -sticky ew |
| 907 | -@ | |
| 908 | -@ wm deiconify . | |
| 909 | -@ update idletasks | |
| 909 | +@ | |
| 910 | 910 | @ .spacer config -height [winfo height .sbxA] |
| 911 | +@ wm deiconify . | |
| 911 | 912 | ; |
| 912 | 913 | |
| 913 | 914 | /* |
| 914 | 915 | ** Show diff output in a Tcl/Tk window, in response to the --tk option |
| 915 | 916 | ** to the diff command. |
| 916 | 917 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -766,11 +766,11 @@ | |
| 766 | @ disableSync x |
| 767 | @ $col xview moveto [expr {$first*[xvis $col]/($last-$first)}] |
| 768 | @ foreach side {A B} { |
| 769 | @ set sb .sbx$side |
| 770 | @ set xview [.txt$side xview] |
| 771 | @ if {$xview ne "0.0 1.0"} { |
| 772 | @ grid $sb |
| 773 | @ eval $sb set $xview |
| 774 | @ } else { |
| 775 | @ grid remove $sb |
| 776 | @ } |
| @@ -893,23 +893,24 @@ | |
| 893 | @ |
| 894 | @ if {[readDiffs $cmd] == 0} { |
| 895 | @ tk_messageBox -type ok -title $CFG(TITLE) -message "No changes" |
| 896 | @ exit |
| 897 | @ } |
| 898 | @ |
| 899 | @ grid rowconfigure . 1 -weight 1 |
| 900 | @ grid columnconfigure . 1 -weight 1 |
| 901 | @ grid columnconfigure . 4 -weight 1 |
| 902 | @ grid .files -columnspan 6 |
| 903 | @ eval grid [cols] .sby -sticky nsew |
| 904 | @ grid .sbxA -row 2 -column 0 -columnspan 2 -sticky ew |
| 905 | @ grid .spacer -row 2 -column 2 |
| 906 | @ grid .sbxB -row 2 -column 3 -columnspan 2 -sticky ew |
| 907 | @ |
| 908 | @ wm deiconify . |
| 909 | @ update idletasks |
| 910 | @ .spacer config -height [winfo height .sbxA] |
| 911 | ; |
| 912 | |
| 913 | /* |
| 914 | ** Show diff output in a Tcl/Tk window, in response to the --tk option |
| 915 | ** to the diff command. |
| 916 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -766,11 +766,11 @@ | |
| 766 | @ disableSync x |
| 767 | @ $col xview moveto [expr {$first*[xvis $col]/($last-$first)}] |
| 768 | @ foreach side {A B} { |
| 769 | @ set sb .sbx$side |
| 770 | @ set xview [.txt$side xview] |
| 771 | @ if {[lindex $xview 0] > 0 || [lindex $xview 1] < 1} { |
| 772 | @ grid $sb |
| 773 | @ eval $sb set $xview |
| 774 | @ } else { |
| 775 | @ grid remove $sb |
| 776 | @ } |
| @@ -893,23 +893,24 @@ | |
| 893 | @ |
| 894 | @ if {[readDiffs $cmd] == 0} { |
| 895 | @ tk_messageBox -type ok -title $CFG(TITLE) -message "No changes" |
| 896 | @ exit |
| 897 | @ } |
| 898 | @ update idletasks |
| 899 | @ |
| 900 | @ grid rowconfigure . 1 -weight 1 |
| 901 | @ grid columnconfigure . 1 -weight 1 |
| 902 | @ grid columnconfigure . 4 -weight 1 |
| 903 | @ grid .files -row 0 -columnspan 6 |
| 904 | @ eval grid [cols] -row 1 -sticky nsew |
| 905 | @ grid .sby -row 1 -column 5 -sticky ns |
| 906 | @ grid .sbxA -row 2 -columnspan 2 -sticky ew |
| 907 | @ grid .spacer -row 2 -column 2 |
| 908 | @ grid .sbxB -row 2 -column 3 -columnspan 2 -sticky ew |
| 909 | @ |
| 910 | @ .spacer config -height [winfo height .sbxA] |
| 911 | @ wm deiconify . |
| 912 | ; |
| 913 | |
| 914 | /* |
| 915 | ** Show diff output in a Tcl/Tk window, in response to the --tk option |
| 916 | ** to the diff command. |
| 917 |