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

[PATCH] gitk: Add horizontal scrollbar to the files list

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Oct 1, 2019, 10:08 UTC
Message-ID
<5c5803ac99b6aaf7ca39393422ca9aa17f0280ec.1569910203.git.bert.wesarg@googlemail.com>

Wrapping filenames is an unexpected experience in UX design. Disable wrapping and add a horizontal scrollbar to the files list to remove this.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
 gitk | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/gitk b/gitk
index abe4805..bf2a061 100755
--- a/gitk
+++ b/gitk
@@ -2477,13 +2477,16 @@ proc makewindow {} {
 	-background $bgcolor -foreground $fgcolor \
 	-font mainfont \
 	-tabs [list $indent [expr {2 * $indent}]] \
-	-yscrollcommand ".bright.sb set" \
+	-xscrollcommand ".bright.sbx set" \
+	-yscrollcommand ".bright.sby set" \
 	-cursor [. cget -cursor] \
-	-spacing1 1 -spacing3 1
+	-spacing1 1 -spacing3 1 -wrap none
     lappend bglist $cflist
     lappend fglist $cflist
-    ${NS}::scrollbar .bright.sb -command "$cflist yview"
-    pack .bright.sb -side right -fill y
+    ${NS}::scrollbar .bright.sbx -orient horizontal -command "$cflist xview"
+    ${NS}::scrollbar .bright.sby -orient vertical   -command "$cflist yview"
+    pack .bright.sbx -side bottom -fill x
+    pack .bright.sby -side right -fill y
     pack $cflist -side left -fill both -expand 1
     $cflist tag configure highlight \
 	-background [$cflist cget -selectbackground]
-- 
2.23.0.11.g242cf7f110
Next: Marc Branchaud
Message 1 of 2 in “gitk: Add horizontal scrollbar to the files list”
  1. gitk: Add horizontal scrollbar to the files listBert Wesarg, Oct 1, 2019
  2. Marc BranchaudOct 1, 2019

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.