threads / patch / 12298

patchgitk: adding a horizontal scrollbar to the diff window.

Subject: [PATCH] gitk: adding a horizontal scrollbar to the diff window.

## tl;dr

One message between Feb 24, 2008 and Feb 24, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Stefan-W. Hahn· Feb 24, 2008, 20:08 UTC · lore

This patch makes the "unvisible horizontal scroll" feature of the diff window visible by adding a horizontal scrollbar at the bottom of that window.

Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
---
 gitk-git/gitk |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
Show changes to gitk-git/gitk +6 −3
diff --git a/gitk-git/gitk b/gitk-git/gitk
index f1f21e9..a7087a9 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -857,14 +857,17 @@ proc makewindow {} {
     set ctext .bleft.ctext
     text $ctext -background $bgcolor -foreground $fgcolor \
 	-state disabled -font textfont \
+	-xscrollcommand ".bleft.xsb set" \
 	-yscrollcommand scrolltext -wrap none
     if {$have_tk85} {
 	$ctext conf -tabstyle wordprocessor
     }
-    scrollbar .bleft.sb -command "$ctext yview"
+    scrollbar .bleft.ysb -command "$ctext yview"
+    scrollbar .bleft.xsb -command "$ctext xview" -orient horizontal
     pack .bleft.top -side top -fill x
     pack .bleft.mid -side top -fill x
-    pack .bleft.sb -side right -fill y
+    pack .bleft.ysb -side right -fill y
+    pack .bleft.xsb -side bottom -fill x
     pack $ctext -side left -fill both -expand 1
     lappend bglist $ctext
     lappend fglist $ctext
@@ -5604,7 +5607,7 @@ proc searchmarkvisible {doall} {
 proc scrolltext {f0 f1} {
     global searchstring
 
-    .bleft.sb set $f0 $f1
+    .bleft.ysb set $f0 $f1
     if {$searchstring ne {}} {
 	searchmarkvisible 0
     }
-- 
1.5.4.2.198.g3f625


-- 
Stefan-W. Hahn                          It is easy to make things.
/ mailto:stefan.hahn@s-hahn.de /        It is hard to make things simple.			

Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.
Bundesgesetzblatt:
http://www.bgblportal.de/BGBL/bgbl1f/bgbl107s3198.pdf

← back to recent threads