From: mark <mlevedahl@gmail.com>
To: Johannes Sixt via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Cc: Johannes Sixt <j6t@kdbg.org>
Subject: Re: [PATCH 3/5] gitk: show color preferences on the button instead of the label
Date: Fri, 7 Aug 2026 10:37:19 -0400 [thread overview]
Message-ID: <eff19bf1-a8a8-4de0-9fc1-cea4b3d0f1a6@gmail.com> (raw)
In-Reply-To: <0428a92efc4657d2da1e968ebe45038cd186b055.1785998419.git.gitgitgadget@gmail.com>
On 8/6/26 2:40 AM, Johannes Sixt via GitGitGadget wrote:
> From: Johannes Sixt <j6t@kdbg.org>
>
> When the user goes to the color preferences, the eye is automatically
> drawn to the color samples. However, clicking on the sample with the
> intent to change it does nothing. Instead, the text label also acts as
> a button and must be clicked to change the color.
>
> Turn the color samples into clickable buttons and the text labels into
> static text. Use non-themed buttons because their color can be changed
> by simply specifying the color properties. (Themed buttons would need
> a lot more elaboration.)
>
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
> ---
> gitk-git/gitk | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/gitk-git/gitk b/gitk-git/gitk
> index 137940defb..877b2ad27f 100755
> --- a/gitk-git/gitk
> +++ b/gitk-git/gitk
> @@ -11867,10 +11867,10 @@ proc prefspage_colors {notebook} {
> ]
>
> foreach {uielem colorvar idx label title} $coloruielems {
> - label $page.$uielem -padx 40 -relief sunk
> - ttk::button $page.${uielem}btn -text $label \
> + ttk::label $page.$uielem -text $label
> + button $page.${uielem}btn -padx 40 -pady 0 \
> -command [list choosecolor $colorvar $idx $page $title]
> - grid x $page.${uielem}btn $page.$uielem -sticky w
> + grid x $page.$uielem $page.${uielem}btn -sticky w
> }
>
> grid columnconfigure $page 2 -weight 1
> @@ -11896,7 +11896,7 @@ proc prefspage_set_colorswatches {page} {
> linkfg $linkfgcolor \
> ]
> foreach {uielem color} $coloruielems {
> - $page.$uielem configure -background $color
> + $page.${uielem}btn configure -background $color -activebackground $color
> }
> }
>
The original approach has unthemed labels, allowing easy specification of color, and
themed buttons. With this change, the roles reverse, so swapping themed / unthemed makes
sense. Good.
But, the colored buttons do not stand out to my eye as much as in the prior approach.
Perhaps use -borderwidth 2? This is totally subjective, I'm ok if you leave this as-is.
next prev parent reply other threads:[~2026-08-07 14:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 6:40 [PATCH 0/5] gitk: make color preferences visually more pleasing and better usable Johannes Sixt via GitGitGadget
2026-08-06 6:40 ` [PATCH 1/5] gitk: set intitial colors of swatches using the available helper Johannes Sixt via GitGitGadget
2026-08-07 14:36 ` mark
2026-08-06 6:40 ` [PATCH 2/5] gitk: condense repetitive code around color buttons into foreach loops Johannes Sixt via GitGitGadget
2026-08-07 14:37 ` mark
2026-08-06 6:40 ` [PATCH 3/5] gitk: show color preferences on the button instead of the label Johannes Sixt via GitGitGadget
2026-08-07 14:37 ` mark [this message]
2026-08-08 9:33 ` Johannes Sixt
2026-08-06 6:40 ` [PATCH 4/5] gitk: use more natural language for labels of color preferences Johannes Sixt via GitGitGadget
2026-08-06 6:40 ` [PATCH 5/5] gitk: avoid constructing dialog titles from text pieces Johannes Sixt via GitGitGadget
2026-08-07 14:37 ` mark
2026-08-08 10:00 ` Johannes Sixt
2026-08-08 14:55 ` Mark Levedahl
2026-08-08 16:32 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eff19bf1-a8a8-4de0-9fc1-cea4b3d0f1a6@gmail.com \
--to=mlevedahl@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=j6t@kdbg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox