Skip to content

Commit

Permalink
gitk: Let .bleft.mid widgets 'breathe'
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Giuseppe Bilotta authored and Paul Mackerras committed Dec 12, 2015
1 parent 6cb73c8 commit cae4b60
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -2375,16 +2378,17 @@ 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" \
-textvariable diffcontextstring
.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
Expand Down

0 comments on commit cae4b60

Please sign in to comment.