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

[PATCH 2/3] gitk: do not set fg/bg color scheme for themed Tk

From
CGChristoph Sommer via GitGitGadget <gitgitgadget@gmail.com>
Date
Apr 28, 2025, 15:56 UTC
Message-ID
<abe92305dcca8ebece332454004b6611ce2efd5a.1745855773.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1909.git.1745855773.gitgitgadget@gmail.com>
From: Christoph Sommer <sommer@cms-labs.org>

Ignore the uicolor preference not just for win32, but also whenever themed Tk is used. On themed Tk it was frequently only changing the background of only a few select widgets rather than everything - and the default uicolor was frequently not the background color that themed Tk used for its widgets, resulting in a messy looking UI (mostly light gray, with random widgets surrounded by darker gray borders)

Signed-off-by: Christoph Sommer <sommer@cms-labs.org>
---
 gitk-git/gitk | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 8cb17f39d41..da7507af360 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -11991,6 +11991,12 @@ proc setselbg {c} {
 # radiobuttons look bad.  This chooses white for selectColor if the
 # background color is light, or black if it is dark.
 proc setui {c} {
+    global use_ttk
+
+    if {$use_ttk} {
+        return
+    }
+
     if {[tk windowingsystem] eq "win32"} { return }
     set bg [winfo rgb . $c]
     set selc black
-- 
gitgitgadget
Previous: Christoph Sommer via GitGitGadget
Message 4 of 4 in “gitk: small quality of life improvements for themed Tk”
  1. 0/3 gitk: small quality of life improvements for themed TkChristoph Sommer via GitGitGadget, Apr 28, 2025
  2. 1/3 gitk: fix text wrapping preferences for unthemed tkChristoph Sommer via GitGitGadget, Apr 28, 2025
  3. 3/3 gitk: on themed tk, use uicolor to draw a sash between panesChristoph Sommer via GitGitGadget, Apr 28, 2025
  4. 2/3 gitk: do not set fg/bg color scheme for themed TkChristoph Sommer via GitGitGadget, Apr 28, 2025

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.