git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] gitk: Add a horizontal scrollbar for commit history

From
NCNicolas Cornu <ncornu@aldebaran-robotics.com>
Date
Oct 30, 2013, 10:58 UTC
Message-ID
<1383130702-4966-1-git-send-email-ncornu@aldebaran-robotics.com>

This scrollbar is not optional and is useful if there is a lot of tags or branches.

Signed-off-by: Nicolas Cornu <ncornu@aldebaran-robotics.com>
---
 gitk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gitk b/gitk
index 5cd00d8..62563b1 100755
--- a/gitk
+++ b/gitk
@@ -2120,11 +2120,17 @@ proc makewindow {} {
     # create three canvases
     set cscroll .tf.histframe.csb
     set canv .tf.histframe.pwclist.canv
+    set cscrollhl .tf.histframe.pwclist.canv.csb
     canvas $canv \
 	-selectbackground $selectbgcolor \
 	-background $bgcolor -bd 0 \
-	-yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll"
+	-yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll" \
+	-xscrollcommand "scrollcanv $cscrollhl"
     .tf.histframe.pwclist add $canv
+    ${NS}::scrollbar $cscrollhl -command {$canv xview} -orient horizontal
+    if {!$use_ttk} {$cscrollhl configure -highlightthickness 0}
+    pack $cscrollhl -fill x -side bottom
+
     set canv2 .tf.histframe.pwclist.canv2
     canvas $canv2 \
 	-selectbackground $selectbgcolor \
--
1.8.4.2
Next: Johannes Sixt
Message 1 of 9 in “gitk: Add a horizontal scrollbar for commit history”
  1. gitk: Add a horizontal scrollbar for commit historyNicolas Cornu, Oct 30, 2013
  2. Johannes SixtOct 30, 2013
  3. Nicolas CornuOct 30, 2013
  4. Marc BranchaudOct 30, 2013
  5. Nicolas CornuOct 30, 2013
  6. Marc BranchaudOct 30, 2013
  7. Paul MackerrasOct 31, 2013
  8. Heiko VoigtNov 2, 2013
  9. Marc BranchaudNov 4, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.