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

[PATCH 2/2] gitk: let .bleft.mid widgets 'breathe'

From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date
Dec 8, 2015, 07:05 UTC
Message-ID
<1449558351-15038-2-git-send-email-giuseppe.bilotta@gmail.com>
In-Reply-To
<1449558351-15038-1-git-send-email-giuseppe.bilotta@gmail.com>

The widgets on top of the diff window are very tightly packed. Make them breathe a little by adding an 'i'-spaced padding between them.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
 gitk | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gitk b/gitk
index e04264b..b621762 100755
--- a/gitk
+++ b/gitk
@@ -2361,6 +2361,9 @@ proc makewindow {} {
     ${NS}::frame .bleft.mid
     ${NS}::frame .bleft.bottom
 
+    # gap between sub-widgets
+    set wgap [font measure uifont "i"]
+
     ${NS}::button .bleft.top.search -text [mc "Search"] -command dosearch
     pack .bleft.top.search -side left -padx 5
     set sstring .bleft.top.sstring
@@ -2375,8 +2378,9 @@ proc makewindow {} {
 	-command changediffdisp -variable diffelide -value {0 1}
     ${NS}::radiobutton .bleft.mid.new -text [mc "New version"] \
 	-command changediffdisp -variable diffelide -value {1 0}
+
     ${NS}::label .bleft.mid.labeldiffcontext -text "      [mc "Lines of context"]: "
-    pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left
+    pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left -ipadx $wgap
     spinbox .bleft.mid.diffcontext -width 5 \
 	-from 0 -increment 1 -to 10000000 \
 	-validate all -validatecommand "diffcontextvalidate %P" \
@@ -2384,7 +2388,7 @@ proc makewindow {} {
     .bleft.mid.diffcontext set $diffcontext
     trace add variable diffcontextstring write diffcontextchange
     lappend entries .bleft.mid.diffcontext
-    pack .bleft.mid.labeldiffcontext .bleft.mid.diffcontext -side left
+    pack .bleft.mid.labeldiffcontext .bleft.mid.diffcontext -side left -ipadx $wgap
     ${NS}::checkbutton .bleft.mid.ignspace -text [mc "Ignore space change"] \
 	-command changeignorespace -variable ignorespace
     pack .bleft.mid.ignspace -side left -padx 5
-- 
2.6.3.659.gfdd8f28
Previous: Giuseppe BilottaNext: Paul Mackerras
Message 6 of 8 in “gitk spacing/sizing tuning for HiDPI”
  1. 0/2 gitk spacing/sizing tuning for HiDPIGiuseppe Bilotta, Dec 6, 2015
  2. 1/2 gitk: match ttk fonts to gitk fontsGiuseppe Bilotta, Dec 6, 2015
  3. 2/2 gitk: let .bleft.mid widgets 'breathe'Giuseppe Bilotta, Dec 6, 2015
  4. Eric SunshineDec 7, 2015
  5. 1/2 gitk: match ttk fonts to gitk fontsGiuseppe Bilotta, Dec 8, 2015
  6. 2/2 gitk: let .bleft.mid widgets 'breathe'Giuseppe Bilotta, Dec 8, 2015
  7. Paul MackerrasDec 19, 2015
  8. Giuseppe BilottaDec 8, 2015

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.