{"thread":{"id":"66127","subject":"[PATCH 0/5] gitk: make color preferences visually more pleasing and better usable","startedAt":"2026-08-06T06:40:23Z","lastAt":"2026-08-13T20:11:13Z","messageCount":27,"participants":["Johannes Sixt via GitGitGadget","mark","Johannes Sixt","Mark Levedahl","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"549795","messageId":"pull.2194.git.1785998419.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":null,"subject":"[PATCH 0/5] gitk: make color preferences visually more pleasing and better usable","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-06T06:40:13Z","receivedAt":"2026-08-06T06:40:23Z","isPatch":true,"body":"I find the user interface to set the color preferences a bit ugly for these\nreasons:\n\n * The color samples are not clickable as one would expect who enters the\n   dialog. Instead, the description is the button that must be clicked.\n\n * Since the descriptive texts are different for the preferences, the width\n   of the buttons are different, too.\n\n * The descriptions themselves are not always natural language (read: they\n   are nerdy) and use abbreviations.\n\nThis series makes the descriptions static text and turns the color samples\ninto the clickable buttons. It also makes the descriptions and dialog titles\nmore natural language.\n\nThis is the dialog before the change: Screenshot_color_buttons_before\n[https://github.com/user-attachments/assets/910a647f-4e56-47b0-b4c4-e6e7bc966e9c]\nAnd this is the dialog after the change: Screenshot_color_buttons_after\n[https://github.com/user-attachments/assets/d985d837-1b1e-4b43-8bcd-76bca8d060ce]\n\nJohannes Sixt (5):\n  gitk: set intitial colors of swatches using the available helper\n  gitk: condense repetitive code around color buttons into foreach loops\n  gitk: show color preferences on the button instead of the label\n  gitk: use more natural language for labels of color preferences\n  gitk: avoid constructing dialog titles from text pieces\n\n gitk-git/gitk | 123 ++++++++++++++++++++++++--------------------------\n 1 file changed, 59 insertions(+), 64 deletions(-)\n\n\nbase-commit: a97fcc37c2bc6340a8d7ce78dedf227aac4e9aa7\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2194%2Fj6t%2Fgitk-prefs-color-buttons-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2194/j6t/gitk-prefs-color-buttons-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/2194\n-- \ngitgitgadget\n"},{"id":"549796","messageId":"ab16ec6276e448db3c8150e58e2f08d137317198.1785998419.git.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.git.1785998419.gitgitgadget@gmail.com","subject":"[PATCH 1/5] gitk: set intitial colors of swatches using the available helper","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-06T06:40:14Z","receivedAt":"2026-08-06T06:40:26Z","isPatch":true,"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nAfter the user has selected a color in the Preferences dialog, the\nhelper proc prefspage_set_colorswatches is used update the colors shown\nin the Preferences dialog. Use this proc also after the Preferences\ndialog is constructed to show the initial colors. This keeps the\nprocedure that gives the UI elements their colors in a single place.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk-git/gitk | 25 ++++++++++++-------------\n 1 file changed, 12 insertions(+), 13 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 0f3571050b..f5eb963b86 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11801,8 +11801,6 @@ proc prefspage_general {notebook} {\n }\n \n proc prefspage_colors {notebook} {\n-    global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor\n-    global diffbgcolors linkfgcolor\n     global themeloader\n \n     set page [create_prefs_page $notebook.colors]\n@@ -11834,63 +11832,64 @@ proc prefspage_colors {notebook} {\n \n     ttk::label $page.cdisp -text [mc \"Colors: press to choose\"] -font mainfontbold\n     grid $page.cdisp - -sticky w -pady 10\n-    label $page.bg -padx 40 -relief sunk -background $bgcolor\n+    label $page.bg -padx 40 -relief sunk\n     ttk::button $page.bgbut -text [mc \"Background\"] \\\n         -command [list choosecolor bgcolor {} $page [mc \"background\"]]\n     grid x $page.bgbut $page.bg -sticky w\n \n-    label $page.fg -padx 40 -relief sunk -background $fgcolor\n+    label $page.fg -padx 40 -relief sunk\n     ttk::button $page.fgbut -text [mc \"Foreground\"] \\\n         -command [list choosecolor fgcolor {} $page [mc \"foreground\"]]\n     grid x $page.fgbut $page.fg -sticky w\n \n-    label $page.diffold -padx 40 -relief sunk -background [lindex $diffcolors 0]\n+    label $page.diffold -padx 40 -relief sunk\n     ttk::button $page.diffoldbut -text [mc \"Diff: old lines\"] \\\n         -command [list choosecolor diffcolors 0 $page [mc \"diff old lines\"]]\n     grid x $page.diffoldbut $page.diffold -sticky w\n \n-    label $page.diffoldbg -padx 40 -relief sunk -background [lindex $diffbgcolors 0]\n+    label $page.diffoldbg -padx 40 -relief sunk\n     ttk::button $page.diffoldbgbut -text [mc \"Diff: old lines bg\"] \\\n         -command [list choosecolor diffbgcolors 0 $page [mc \"diff old lines bg\"]]\n     grid x $page.diffoldbgbut $page.diffoldbg -sticky w\n \n-    label $page.diffnew -padx 40 -relief sunk -background [lindex $diffcolors 1]\n+    label $page.diffnew -padx 40 -relief sunk\n     ttk::button $page.diffnewbut -text [mc \"Diff: new lines\"] \\\n         -command [list choosecolor diffcolors 1 $page [mc \"diff new lines\"]]\n     grid x $page.diffnewbut $page.diffnew -sticky w\n \n-    label $page.diffnewbg -padx 40 -relief sunk -background [lindex $diffbgcolors 1]\n+    label $page.diffnewbg -padx 40 -relief sunk\n     ttk::button $page.diffnewbgbut -text [mc \"Diff: new lines bg\"] \\\n         -command [list choosecolor diffbgcolors 1 $page [mc \"diff new lines bg\"]]\n     grid x $page.diffnewbgbut $page.diffnewbg -sticky w\n \n-    label $page.hunksep -padx 40 -relief sunk -background [lindex $diffcolors 2]\n+    label $page.hunksep -padx 40 -relief sunk\n     ttk::button $page.hunksepbut -text [mc \"Diff: hunk header\"] \\\n         -command [list choosecolor diffcolors 2 $page [mc \"diff hunk header\"]]\n     grid x $page.hunksepbut $page.hunksep -sticky w\n \n-    label $page.markbgsep -padx 40 -relief sunk -background $markbgcolor\n+    label $page.markbgsep -padx 40 -relief sunk\n     ttk::button $page.markbgbut -text [mc \"Marked line bg\"] \\\n         -command [list choosecolor markbgcolor {} $page [mc \"marked line background\"]]\n     grid x $page.markbgbut $page.markbgsep -sticky w\n \n-    label $page.selbgsep -padx 40 -relief sunk -background $selectbgcolor\n+    label $page.selbgsep -padx 40 -relief sunk\n     ttk::button $page.selbgbut -text [mc \"Select bg\"] \\\n         -command [list choosecolor selectbgcolor {} $page [mc \"background\"]]\n     grid x $page.selbgbut $page.selbgsep -sticky w\n \n-    label $page.linkfg -padx 40 -relief sunk -background $linkfgcolor\n+    label $page.linkfg -padx 40 -relief sunk\n     ttk::button $page.linkfgbut -text [mc \"Link\"] \\\n         -command [list choosecolor linkfgcolor {} $page [mc \"link\"]]\n     grid x $page.linkfgbut $page.linkfg -sticky w\n \n     grid columnconfigure $page 2 -weight 1\n+    prefspage_set_colorswatches $page\n \n     return $page\n }\n \n proc prefspage_set_colorswatches {page} {\n-    global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor\n+    global bgcolor fgcolor diffcolors selectbgcolor markbgcolor\n     global diffbgcolors linkfgcolor\n \n     $page.bg configure -background $bgcolor\n-- \ngitgitgadget\n\n"},{"id":"549797","messageId":"edb567608e1bda16efbdb8d4ec359318cf105284.1785998419.git.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.git.1785998419.gitgitgadget@gmail.com","subject":"[PATCH 2/5] gitk: condense repetitive code around color buttons into foreach loops","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-06T06:40:15Z","receivedAt":"2026-08-06T06:40:28Z","isPatch":true,"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nThe color selection elements in the Preferences dialog are set up in a\nvery uniform manner. The code doing that has grown in the past by simply\nmodifying a copy of a paragraph. Extract the varying parts into a list\nand then operate the repeating parts in a foreach loop. This helps a\nlater change where we want to set up the UI elements in a different way.\n\nChange the UI names \"markbgsep\" and \"selbgsep\" to drop the \"sep\", which\nhas obviously been left over by accident when \"hunksep\" was copied.\n\nChange the suffix \"but\" to \"btn\", which resonates a bit better when\nreading the code.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk-git/gitk | 114 ++++++++++++++++++++++++--------------------------\n 1 file changed, 55 insertions(+), 59 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex f5eb963b86..137940defb 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11832,55 +11832,46 @@ proc prefspage_colors {notebook} {\n \n     ttk::label $page.cdisp -text [mc \"Colors: press to choose\"] -font mainfontbold\n     grid $page.cdisp - -sticky w -pady 10\n-    label $page.bg -padx 40 -relief sunk\n-    ttk::button $page.bgbut -text [mc \"Background\"] \\\n-        -command [list choosecolor bgcolor {} $page [mc \"background\"]]\n-    grid x $page.bgbut $page.bg -sticky w\n-\n-    label $page.fg -padx 40 -relief sunk\n-    ttk::button $page.fgbut -text [mc \"Foreground\"] \\\n-        -command [list choosecolor fgcolor {} $page [mc \"foreground\"]]\n-    grid x $page.fgbut $page.fg -sticky w\n-\n-    label $page.diffold -padx 40 -relief sunk\n-    ttk::button $page.diffoldbut -text [mc \"Diff: old lines\"] \\\n-        -command [list choosecolor diffcolors 0 $page [mc \"diff old lines\"]]\n-    grid x $page.diffoldbut $page.diffold -sticky w\n-\n-    label $page.diffoldbg -padx 40 -relief sunk\n-    ttk::button $page.diffoldbgbut -text [mc \"Diff: old lines bg\"] \\\n-        -command [list choosecolor diffbgcolors 0 $page [mc \"diff old lines bg\"]]\n-    grid x $page.diffoldbgbut $page.diffoldbg -sticky w\n-\n-    label $page.diffnew -padx 40 -relief sunk\n-    ttk::button $page.diffnewbut -text [mc \"Diff: new lines\"] \\\n-        -command [list choosecolor diffcolors 1 $page [mc \"diff new lines\"]]\n-    grid x $page.diffnewbut $page.diffnew -sticky w\n-\n-    label $page.diffnewbg -padx 40 -relief sunk\n-    ttk::button $page.diffnewbgbut -text [mc \"Diff: new lines bg\"] \\\n-        -command [list choosecolor diffbgcolors 1 $page [mc \"diff new lines bg\"]]\n-    grid x $page.diffnewbgbut $page.diffnewbg -sticky w\n-\n-    label $page.hunksep -padx 40 -relief sunk\n-    ttk::button $page.hunksepbut -text [mc \"Diff: hunk header\"] \\\n-        -command [list choosecolor diffcolors 2 $page [mc \"diff hunk header\"]]\n-    grid x $page.hunksepbut $page.hunksep -sticky w\n-\n-    label $page.markbgsep -padx 40 -relief sunk\n-    ttk::button $page.markbgbut -text [mc \"Marked line bg\"] \\\n-        -command [list choosecolor markbgcolor {} $page [mc \"marked line background\"]]\n-    grid x $page.markbgbut $page.markbgsep -sticky w\n-\n-    label $page.selbgsep -padx 40 -relief sunk\n-    ttk::button $page.selbgbut -text [mc \"Select bg\"] \\\n-        -command [list choosecolor selectbgcolor {} $page [mc \"background\"]]\n-    grid x $page.selbgbut $page.selbgsep -sticky w\n-\n-    label $page.linkfg -padx 40 -relief sunk\n-    ttk::button $page.linkfgbut -text [mc \"Link\"] \\\n-        -command [list choosecolor linkfgcolor {} $page [mc \"link\"]]\n-    grid x $page.linkfgbut $page.linkfg -sticky w\n+\n+    set coloruielems [list \\\n+        bg          bgcolor {} \\\n+                    [mc \"Background\"] \\\n+                    [mc \"background\"] \\\n+        fg          fgcolor {} \\\n+                    [mc \"Foreground\"] \\\n+                    [mc \"foreground\"] \\\n+        diffold     diffcolors 0 \\\n+                    [mc \"Diff: old lines\"] \\\n+                    [mc \"diff old lines\"] \\\n+        diffoldbg   diffbgcolors 0 \\\n+                    [mc \"Diff: old lines bg\"] \\\n+                    [mc \"diff old lines bg\"] \\\n+        diffnew     diffcolors 1 \\\n+                    [mc \"Diff: new lines\"] \\\n+                    [mc \"diff new lines\"] \\\n+        diffnewbg   diffbgcolors 1 \\\n+                    [mc \"Diff: new lines bg\"] \\\n+                    [mc \"diff new lines bg\"] \\\n+        hunksep     diffcolors 2 \\\n+                    [mc \"Diff: hunk header\"] \\\n+                    [mc \"diff hunk header\"] \\\n+        markbg      markbgcolor {} \\\n+                    [mc \"Marked line bg\"] \\\n+                    [mc \"marked line background\"] \\\n+        selbg       selectbgcolor {} \\\n+                    [mc \"Select bg\"] \\\n+                    [mc \"background\"] \\\n+        linkfg      linkfgcolor {} \\\n+                    [mc \"Link\"] \\\n+                    [mc \"link\"] \\\n+    ]\n+\n+    foreach {uielem colorvar idx label title} $coloruielems {\n+        label $page.$uielem -padx 40 -relief sunk\n+        ttk::button $page.${uielem}btn -text $label \\\n+            -command [list choosecolor $colorvar $idx $page $title]\n+        grid x $page.${uielem}btn $page.$uielem -sticky w\n+    }\n \n     grid columnconfigure $page 2 -weight 1\n     prefspage_set_colorswatches $page\n@@ -11892,16 +11883,21 @@ proc prefspage_set_colorswatches {page} {\n     global bgcolor fgcolor diffcolors selectbgcolor markbgcolor\n     global diffbgcolors linkfgcolor\n \n-    $page.bg configure -background $bgcolor\n-    $page.fg configure -background $fgcolor\n-    $page.diffold configure -background [lindex $diffcolors 0]\n-    $page.diffoldbg configure -background [lindex $diffbgcolors 0]\n-    $page.diffnew configure -background [lindex $diffcolors 1]\n-    $page.diffnewbg configure -background [lindex $diffbgcolors 1]\n-    $page.hunksep configure -background [lindex $diffcolors 2]\n-    $page.markbgsep configure -background $markbgcolor\n-    $page.selbgsep configure -background $selectbgcolor\n-    $page.linkfg configure -background $linkfgcolor\n+    set coloruielems [list \\\n+        bg        $bgcolor \\\n+        fg        $fgcolor \\\n+        diffold   [lindex $diffcolors 0] \\\n+        diffoldbg [lindex $diffbgcolors 0] \\\n+        diffnew   [lindex $diffcolors 1] \\\n+        diffnewbg [lindex $diffbgcolors 1] \\\n+        hunksep   [lindex $diffcolors 2] \\\n+        markbg    $markbgcolor \\\n+        selbg     $selectbgcolor \\\n+        linkfg    $linkfgcolor \\\n+    ]\n+    foreach {uielem color} $coloruielems {\n+        $page.$uielem configure -background $color\n+    }\n }\n \n proc prefspage_fonts {notebook} {\n-- \ngitgitgadget\n\n"},{"id":"549798","messageId":"0428a92efc4657d2da1e968ebe45038cd186b055.1785998419.git.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.git.1785998419.gitgitgadget@gmail.com","subject":"[PATCH 3/5] gitk: show color preferences on the button instead of the label","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-06T06:40:16Z","receivedAt":"2026-08-06T06:40:31Z","isPatch":true,"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nWhen the user goes to the color preferences, the eye is automatically\ndrawn to the color samples. However, clicking on the sample with the\nintent to change it does nothing. Instead, the text label also acts as\na button and must be clicked to change the color.\n\nTurn the color samples into clickable buttons and the text labels into\nstatic text. Use non-themed buttons because their color can be changed\nby simply specifying the color properties. (Themed buttons would need\na lot more elaboration.)\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk-git/gitk | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 137940defb..877b2ad27f 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11867,10 +11867,10 @@ proc prefspage_colors {notebook} {\n     ]\n \n     foreach {uielem colorvar idx label title} $coloruielems {\n-        label $page.$uielem -padx 40 -relief sunk\n-        ttk::button $page.${uielem}btn -text $label \\\n+        ttk::label $page.$uielem -text $label\n+        button $page.${uielem}btn -padx 40 -pady 0 \\\n             -command [list choosecolor $colorvar $idx $page $title]\n-        grid x $page.${uielem}btn $page.$uielem -sticky w\n+        grid x $page.$uielem $page.${uielem}btn -sticky w\n     }\n \n     grid columnconfigure $page 2 -weight 1\n@@ -11896,7 +11896,7 @@ proc prefspage_set_colorswatches {page} {\n         linkfg    $linkfgcolor \\\n     ]\n     foreach {uielem color} $coloruielems {\n-        $page.$uielem configure -background $color\n+        $page.${uielem}btn configure -background $color -activebackground $color\n     }\n }\n \n-- \ngitgitgadget\n\n"},{"id":"549799","messageId":"ce417701a8b5cc0c3e0c0bfb235a75d4f8ac6877.1785998419.git.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.git.1785998419.gitgitgadget@gmail.com","subject":"[PATCH 4/5] gitk: use more natural language for labels of color preferences","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-06T06:40:17Z","receivedAt":"2026-08-06T06:40:34Z","isPatch":true,"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nThe labels used to be clickable buttons. These would have looked funny\nif they carried long texts. For this reason, abbreviations and \"nerdy\"\ntexts were used to keep them short. Since these labels are now static\ntext, bring them closer to natural language.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk-git/gitk | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 877b2ad27f..9e735d91bf 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11838,31 +11838,31 @@ proc prefspage_colors {notebook} {\n                     [mc \"Background\"] \\\n                     [mc \"background\"] \\\n         fg          fgcolor {} \\\n-                    [mc \"Foreground\"] \\\n+                    [mc \"Main text\"] \\\n                     [mc \"foreground\"] \\\n         diffold     diffcolors 0 \\\n                     [mc \"Diff: old lines\"] \\\n                     [mc \"diff old lines\"] \\\n         diffoldbg   diffbgcolors 0 \\\n-                    [mc \"Diff: old lines bg\"] \\\n+                    [mc \"Diff: old lines background\"] \\\n                     [mc \"diff old lines bg\"] \\\n         diffnew     diffcolors 1 \\\n                     [mc \"Diff: new lines\"] \\\n                     [mc \"diff new lines\"] \\\n         diffnewbg   diffbgcolors 1 \\\n-                    [mc \"Diff: new lines bg\"] \\\n+                    [mc \"Diff: new lines background\"] \\\n                     [mc \"diff new lines bg\"] \\\n         hunksep     diffcolors 2 \\\n-                    [mc \"Diff: hunk header\"] \\\n+                    [mc \"Diff: hunk headers\"] \\\n                     [mc \"diff hunk header\"] \\\n         markbg      markbgcolor {} \\\n-                    [mc \"Marked line bg\"] \\\n+                    [mc \"Marked lines background\"] \\\n                     [mc \"marked line background\"] \\\n         selbg       selectbgcolor {} \\\n-                    [mc \"Select bg\"] \\\n+                    [mc \"Selected text background\"] \\\n                     [mc \"background\"] \\\n         linkfg      linkfgcolor {} \\\n-                    [mc \"Link\"] \\\n+                    [mc \"Link text\"] \\\n                     [mc \"link\"] \\\n     ]\n \n-- \ngitgitgadget\n\n"},{"id":"549800","messageId":"1e1bcfaf5bbe66fac364d5b7d3a7ebdc5f37531c.1785998419.git.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.git.1785998419.gitgitgadget@gmail.com","subject":"[PATCH 5/5] gitk: avoid constructing dialog titles from text pieces","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-06T06:40:18Z","receivedAt":"2026-08-06T06:40:37Z","isPatch":true,"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nWhen the user clicks a color preference, a color selection dialog is\npresented whose title is provided in parts by the caller. The dialog\nimplementation must supply the rest of the title. This is unfriendly\nfor translations. Provide the full title by the caller. Rewrite the\ntexts to be more natural language.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk-git/gitk | 24 ++++++++++++------------\n 1 file changed, 12 insertions(+), 12 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 9e735d91bf..454f54dca8 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11836,34 +11836,34 @@ proc prefspage_colors {notebook} {\n     set coloruielems [list \\\n         bg          bgcolor {} \\\n                     [mc \"Background\"] \\\n-                    [mc \"background\"] \\\n+                    [mc \"choose background color\"] \\\n         fg          fgcolor {} \\\n                     [mc \"Main text\"] \\\n-                    [mc \"foreground\"] \\\n+                    [mc \"choose main text color\"] \\\n         diffold     diffcolors 0 \\\n                     [mc \"Diff: old lines\"] \\\n-                    [mc \"diff old lines\"] \\\n+                    [mc \"choose text color of old lines\"] \\\n         diffoldbg   diffbgcolors 0 \\\n                     [mc \"Diff: old lines background\"] \\\n-                    [mc \"diff old lines bg\"] \\\n+                    [mc \"choose background color of old lines\"] \\\n         diffnew     diffcolors 1 \\\n                     [mc \"Diff: new lines\"] \\\n-                    [mc \"diff new lines\"] \\\n+                    [mc \"choose text color of new lines\"] \\\n         diffnewbg   diffbgcolors 1 \\\n                     [mc \"Diff: new lines background\"] \\\n-                    [mc \"diff new lines bg\"] \\\n+                    [mc \"choose background color of new lines\"] \\\n         hunksep     diffcolors 2 \\\n                     [mc \"Diff: hunk headers\"] \\\n-                    [mc \"diff hunk header\"] \\\n+                    [mc \"choose hunk header color\"] \\\n         markbg      markbgcolor {} \\\n                     [mc \"Marked lines background\"] \\\n-                    [mc \"marked line background\"] \\\n+                    [mc \"choose background color of marked lines\"] \\\n         selbg       selectbgcolor {} \\\n                     [mc \"Selected text background\"] \\\n-                    [mc \"background\"] \\\n+                    [mc \"choose background color of selected text\"] \\\n         linkfg      linkfgcolor {} \\\n                     [mc \"Link text\"] \\\n-                    [mc \"link\"] \\\n+                    [mc \"choose color of link text\"] \\\n     ]\n \n     foreach {uielem colorvar idx label title} $coloruielems {\n@@ -12014,11 +12014,11 @@ proc choose_themeloader {prefspage} {\n     }\n }\n \n-proc choosecolor {v vi prefspage x} {\n+proc choosecolor {v vi prefspage title} {\n     global $v\n \n     set c [tk_chooseColor -initialcolor [lindex [set $v] $vi] \\\n-               -title [mc \"Gitk: choose color for %s\" $x]]\n+               -title \"Gitk: $title\"]\n     if {$c eq {}} return\n     lset $v $vi $c\n     set_gui_colors\n-- \ngitgitgadget\n"},{"id":"550004","messageId":"4a1dc534-e9bd-41e6-8ae5-fb08c06479a7@gmail.com","threadId":"66127","inReplyTo":"ab16ec6276e448db3c8150e58e2f08d137317198.1785998419.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/5] gitk: set intitial colors of swatches using the available helper","fromName":"mark","fromEmail":"mlevedahl@gmail.com","sentAt":"2026-08-07T14:36:58Z","receivedAt":"2026-08-07T14:37:00Z","isPatch":true,"body":"On 8/6/26 2:40 AM, Johannes Sixt via GitGitGadget wrote:\n> From: Johannes Sixt <j6t@kdbg.org>\n> \n> After the user has selected a color in the Preferences dialog, the\n> helper proc prefspage_set_colorswatches is used update the colors shown\n> in the Preferences dialog. Use this proc also after the Preferences\n> dialog is constructed to show the initial colors. This keeps the\n> procedure that gives the UI elements their colors in a single place.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\nThis completes collecting the color settings to one place, Good!\n"},{"id":"550005","messageId":"a2e12e20-ad46-4521-9d45-5b74730361f1@gmail.com","threadId":"66127","inReplyTo":"edb567608e1bda16efbdb8d4ec359318cf105284.1785998419.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 2/5] gitk: condense repetitive code around color buttons into foreach loops","fromName":"mark","fromEmail":"mlevedahl@gmail.com","sentAt":"2026-08-07T14:37:10Z","receivedAt":"2026-08-07T14:37:13Z","isPatch":true,"body":"On 8/6/26 2:40 AM, Johannes Sixt via GitGitGadget wrote:\n> From: Johannes Sixt <j6t@kdbg.org>\n> \n> The color selection elements in the Preferences dialog are set up in a\n> very uniform manner. The code doing that has grown in the past by simply\n> modifying a copy of a paragraph. Extract the varying parts into a list\n> and then operate the repeating parts in a foreach loop. This helps a\n> later change where we want to set up the UI elements in a different way.\n> \n> Change the UI names \"markbgsep\" and \"selbgsep\" to drop the \"sep\", which\n> has obviously been left over by accident when \"hunksep\" was copied.\n> \n> Change the suffix \"but\" to \"btn\", which resonates a bit better when\n> reading the code.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>  gitk-git/gitk | 114 ++++++++++++++++++++++++--------------------------\n>  1 file changed, 55 insertions(+), 59 deletions(-)\n> \n> diff --git a/gitk-git/gitk b/gitk-git/gitk\n> index f5eb963b86..137940defb 100755\n> --- a/gitk-git/gitk\n> +++ b/gitk-git/gitk\n> @@ -11832,55 +11832,46 @@ proc prefspage_colors {notebook} {\n\n\n> -\n> -    label $page.linkfg -padx 40 -relief sunk\n> -    ttk::button $page.linkfgbut -text [mc \"Link\"] \\\n> -        -command [list choosecolor linkfgcolor {} $page [mc \"link\"]]\n> -    grid x $page.linkfgbut $page.linkfg -sticky w\n> +\n> +    set coloruielems [list \\\n> +        bg          bgcolor {} \\\n> +                    [mc \"Background\"] \\\n> +                    [mc \"background\"] \\\n> +        fg          fgcolor {} \\\n> +                    [mc \"Foreground\"] \\\n> +                    [mc \"foreground\"] \\\nThe list is computed and used each time a dialog box is started from all static elements,\nno real change. But this cleanly separates the per item data from the boiler plate,\ndefinitely more readable. Good.\n"},{"id":"550006","messageId":"eff19bf1-a8a8-4de0-9fc1-cea4b3d0f1a6@gmail.com","threadId":"66127","inReplyTo":"0428a92efc4657d2da1e968ebe45038cd186b055.1785998419.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 3/5] gitk: show color preferences on the button instead of the label","fromName":"mark","fromEmail":"mlevedahl@gmail.com","sentAt":"2026-08-07T14:37:19Z","receivedAt":"2026-08-07T14:37:21Z","isPatch":true,"body":"On 8/6/26 2:40 AM, Johannes Sixt via GitGitGadget wrote:\n> From: Johannes Sixt <j6t@kdbg.org>\n> \n> When the user goes to the color preferences, the eye is automatically\n> drawn to the color samples. However, clicking on the sample with the\n> intent to change it does nothing. Instead, the text label also acts as\n> a button and must be clicked to change the color.\n> \n> Turn the color samples into clickable buttons and the text labels into\n> static text. Use non-themed buttons because their color can be changed\n> by simply specifying the color properties. (Themed buttons would need\n> a lot more elaboration.)\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>  gitk-git/gitk | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n> \n> diff --git a/gitk-git/gitk b/gitk-git/gitk\n> index 137940defb..877b2ad27f 100755\n> --- a/gitk-git/gitk\n> +++ b/gitk-git/gitk\n> @@ -11867,10 +11867,10 @@ proc prefspage_colors {notebook} {\n>      ]\n>  \n>      foreach {uielem colorvar idx label title} $coloruielems {\n> -        label $page.$uielem -padx 40 -relief sunk\n> -        ttk::button $page.${uielem}btn -text $label \\\n> +        ttk::label $page.$uielem -text $label\n> +        button $page.${uielem}btn -padx 40 -pady 0 \\\n>              -command [list choosecolor $colorvar $idx $page $title]\n> -        grid x $page.${uielem}btn $page.$uielem -sticky w\n> +        grid x $page.$uielem $page.${uielem}btn -sticky w\n>      }\n>  \n>      grid columnconfigure $page 2 -weight 1\n> @@ -11896,7 +11896,7 @@ proc prefspage_set_colorswatches {page} {\n>          linkfg    $linkfgcolor \\\n>      ]\n>      foreach {uielem color} $coloruielems {\n> -        $page.$uielem configure -background $color\n> +        $page.${uielem}btn configure -background $color -activebackground $color\n>      }\n>  }\n>  \n\nThe original approach has unthemed labels, allowing easy specification of color, and\nthemed buttons. With this change, the roles reverse, so swapping themed / unthemed makes\nsense. Good.\n\nBut, the colored buttons do not stand out to my eye as much as in the prior approach.\nPerhaps use -borderwidth 2? This is totally subjective, I'm ok if you leave this as-is.\n"},{"id":"550007","messageId":"f25e5fe8-cf6a-4d87-9c46-bf5b7490434d@gmail.com","threadId":"66127","inReplyTo":"1e1bcfaf5bbe66fac364d5b7d3a7ebdc5f37531c.1785998419.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 5/5] gitk: avoid constructing dialog titles from text pieces","fromName":"mark","fromEmail":"mlevedahl@gmail.com","sentAt":"2026-08-07T14:37:35Z","receivedAt":"2026-08-07T14:37:38Z","isPatch":true,"body":"On 8/6/26 2:40 AM, Johannes Sixt via GitGitGadget wrote:\n> From: Johannes Sixt <j6t@kdbg.org>\n> \n> When the user clicks a color preference, a color selection dialog is\n> presented whose title is provided in parts by the caller. The dialog\n> implementation must supply the rest of the title. This is unfriendly\n> for translations. Provide the full title by the caller. Rewrite the\n> texts to be more natural language.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>  gitk-git/gitk | 24 ++++++++++++------------\n>  1 file changed, 12 insertions(+), 12 deletions(-)\n> \n> diff --git a/gitk-git/gitk b/gitk-git/gitk\n> index 9e735d91bf..454f54dca8 100755\n> --- a/gitk-git/gitk\n> +++ b/gitk-git/gitk\n> @@ -11836,34 +11836,34 @@ proc prefspage_colors {notebook} {\n>      set coloruielems [list \\\n>          bg          bgcolor {} \\\n>                      [mc \"Background\"] \\\n> -                    [mc \"background\"] \\\n> +                    [mc \"choose background color\"] \\\n>          fg          fgcolor {} \\\n>                      [mc \"Main text\"] \\\n> -                    [mc \"foreground\"] \\\n> +                    [mc \"choose main text color\"] \\\n\n> @@ -12014,11 +12014,11 @@ proc choose_themeloader {prefspage} {\n>      }\n>  }\n>  \n> -proc choosecolor {v vi prefspage x} {\n> +proc choosecolor {v vi prefspage title} {\n>      global $v\n>  \n>      set c [tk_chooseColor -initialcolor [lindex [set $v] $vi] \\\n> -               -title [mc \"Gitk: choose color for %s\" $x]]\n> +               -title \"Gitk: $title\"]\n>      if {$c eq {}} return\n>      lset $v $vi $c\n>      set_gui_colors\n\nThis with the prior patch should help translation due to use of more common idioms and\ncomplete phrases rather than jargon. Good.\n"},{"id":"550092","messageId":"39f99016-8ac4-42f4-9a61-7f20b5431c1c@kdbg.org","threadId":"66127","inReplyTo":"eff19bf1-a8a8-4de0-9fc1-cea4b3d0f1a6@gmail.com","subject":"Re: [PATCH 3/5] gitk: show color preferences on the button instead of the label","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2026-08-08T09:33:11Z","receivedAt":"2026-08-08T09:33:22Z","isPatch":true,"body":"Am 07.08.26 um 16:37 schrieb mark:\n> But, the colored buttons do not stand out to my eye as much as in the prior approach.\n> Perhaps use -borderwidth 2?\n\nI agree. -borderwith 2 does help emphasize that these are clickable\nbuttons. I'll also insert a small space between the buttons like this:\n\n@@ -11868,9 +11868,9 @@ proc prefspage_colors {notebook} {\n \n     foreach {uielem colorvar idx label title} $coloruielems {\n         ttk::label $page.$uielem -text $label\n-        button $page.${uielem}btn -padx 40 -pady 0 \\\n+        button $page.${uielem}btn -padx 40 -pady 0 -borderwidth 2 \\\n             -command [list choosecolor $colorvar $idx $page $title]\n-        grid x $page.$uielem $page.${uielem}btn -sticky w\n+        grid x $page.$uielem $page.${uielem}btn -sticky w -pady 1\n     }\n \n     grid columnconfigure $page 2 -weight 1\n\n\n-- Hannes\n\n"},{"id":"550093","messageId":"b1d397e1-ab2d-439e-ba45-0ade2c216afa@kdbg.org","threadId":"66127","inReplyTo":"f25e5fe8-cf6a-4d87-9c46-bf5b7490434d@gmail.com","subject":"Re: [PATCH 5/5] gitk: avoid constructing dialog titles from text pieces","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2026-08-08T10:00:18Z","receivedAt":"2026-08-08T10:00:27Z","isPatch":true,"body":"Am 07.08.26 um 16:37 schrieb mark:\n> This with the prior patch should help translation due to use of more common idioms and\n> complete phrases rather than jargon. Good.\n\n\"Complete phrases\" and \"jargon\" are words I need for the commit\nmessages! Thank you :-)\n\nNow, with a fresh eye, I see that we have text like this:\n\n\tDiff: old lines background\n\nThis looks more like an assemblement of words and jargon than a phrase\nin natural language. Any suggestions for improvement? How about\n\n\tBackground of old lines in diffs\n\nSounds a bit clumsy.\n\n(In this case I prefer to say \"diffs\" rather than e.g. \"patch text\",\nbecause we are looking at differences between versions, \"diffs\", and not\npatches. Also, we already have \"diff\" in multiple other places in the UI.)\n\n-- Hannes\n\n"},{"id":"550095","messageId":"433a3e74-c66e-40a3-9971-c8cb9692967d@gmail.com","threadId":"66127","inReplyTo":"b1d397e1-ab2d-439e-ba45-0ade2c216afa@kdbg.org","subject":"Re: [PATCH 5/5] gitk: avoid constructing dialog titles from text pieces","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2026-08-08T14:55:52Z","receivedAt":"2026-08-08T14:55:56Z","isPatch":true,"body":"\n\nOn 8/8/26 6:00 AM, Johannes Sixt wrote:\n> Am 07.08.26 um 16:37 schrieb mark:\n>> This with the prior patch should help translation due to use of more common idioms and\n>> complete phrases rather than jargon. Good.\n> \"Complete phrases\" and \"jargon\" are words I need for the commit\n> messages! Thank you :-)\n>\n> Now, with a fresh eye, I see that we have text like this:\n>\n> \tDiff: old lines background\n>\n> This looks more like an assemblement of words and jargon than a phrase\n> in natural language. Any suggestions for improvement? How about\n>\n> \tBackground of old lines in diffs\n>\n> Sounds a bit clumsy.\n>\n> (In this case I prefer to say \"diffs\" rather than e.g. \"patch text\",\n> because we are looking at differences between versions, \"diffs\", and not\n> patches. Also, we already have \"diff\" in multiple other places in the UI.)\n>\n> -- Hannes\n>\n\nI'm ok with using \"Diff\" as a common identifier for this here. gitk is parsing commit\ndiffs from git, showing each hunk separately. I'd also rather not use patch. The UI\nalready shows \"new version\" and \"old version\", so using new lines and old lines is consistent.\n\nBut, one thing missing, hinted at by your suggestion \"Background of ...\" is that the clear\ndefinition of what is being affected is poorly expressed. A complete description of each\nitem would require a paragraph, probably with an example image. Trying to compress into a\nfew words will always exploit context and presume some common language we expect a\ngit/gitk user to understand or be able to learn in context.\n\nMaybe some extra words and categorization would help. Consider using a longer category\ndescription to provide common information, for instance:\n\n  -General Canvas Area\n                           Background\n       Marked Lines Background\n                              Main Text\n                        Selected Text\n                              Link Text\n    -Commit Differences\n                          old line text\n                        new line text\n             -old line background\n       etc.\n\netc, where the lines beginning with \"-\" are just separators and do not have an associated\ncolor selection button.\n\nMark\n\nMark\n\n"},{"id":"550100","messageId":"xmqqecg8bmjk.fsf@gitster.g","threadId":"66127","inReplyTo":"b1d397e1-ab2d-439e-ba45-0ade2c216afa@kdbg.org","subject":"Re: [PATCH 5/5] gitk: avoid constructing dialog titles from text pieces","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-08-08T16:32:31Z","receivedAt":"2026-08-08T16:32:34Z","isPatch":true,"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> \tDiff: old lines background\n> \tBackground of old lines in diffs\n>\n> Sounds a bit clumsy.\n\nBoth lacking \"color\" is not a problem because it is easy to see that\nthis entire thing is about \"color\" from the context (like these\nappear in \"Color\" menu or something)?\n\n"},{"id":"550113","messageId":"27207bb8-96ca-4442-a0d1-81340d5558ee@kdbg.org","threadId":"66127","inReplyTo":"xmqqecg8bmjk.fsf@gitster.g","subject":"Re: [PATCH 5/5] gitk: avoid constructing dialog titles from text pieces","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2026-08-09T07:04:31Z","receivedAt":"2026-08-09T07:04:43Z","isPatch":true,"body":"Am 08.08.26 um 18:32 schrieb Junio C Hamano:\n> Both lacking \"color\" is not a problem because it is easy to see that\n> this entire thing is about \"color\" from the context (like these\n> appear in \"Color\" menu or something)?\nYes. The page's title is \"Color\", and there is a section title on the\npage that mentions \"Color\" as well.\n\n-- Hannes\n\n"},{"id":"550114","messageId":"cf2a38fe-bd22-46fb-bb1d-f994c50f0a0b@kdbg.org","threadId":"66127","inReplyTo":"433a3e74-c66e-40a3-9971-c8cb9692967d@gmail.com","subject":"Re: [PATCH 5/5] gitk: avoid constructing dialog titles from text pieces","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2026-08-09T07:27:01Z","receivedAt":"2026-08-09T07:27:05Z","isPatch":true,"body":"Am 08.08.26 um 16:55 schrieb Mark Levedahl:\n> The UI\n> already shows \"new version\" and \"old version\", so using new lines and old lines is consistent.\n\nExactly my reasoning as well!\n\n> But, one thing missing, hinted at by your suggestion \"Background of ...\" is that the clear\n> definition of what is being affected is poorly expressed. A complete description of each\n> item would require a paragraph, probably with an example image. Trying to compress into a\n> few words will always exploit context and presume some common language we expect a\n> git/gitk user to understand or be able to learn in context.\n> \n> Maybe some extra words and categorization would help. Consider using a longer category\n> description to provide common information, for instance:\n> \n>   -General Canvas Area\n>                            Background\n>        Marked Lines Background\n>                               Main Text\n>                         Selected Text\n>                               Link Text\n>     -Commit Differences\n>                           old line text\n>                         new line text\n>              -old line background\n>        etc.\n> \n> etc, where the lines beginning with \"-\" are just separators and do not have an associated\n> color selection button.\nI am not happy with additional section titles, because they take away\nvertical space. Actually, I think I'll *omit* \"Diff\" from the labels,\nbecause all colors apply to the primary panel of the entire UI, which is\nthe diff text. Of course, the top ones listed above apply *also* to the\nother panels, but let's think about that another time.\n\nMy take-aways from your proposal are:\n\n- The entries should be rearranged. In particular, selection, marked\nlines and link text must move above the diff colors.\n\n- \"old line text\" and \"old line background\" are acceptable English\nphrases. (Note: singular \"line\", not plural \"lines\".)\n\n-- Hannes\n\n"},{"id":"550401","messageId":"pull.2194.v2.git.1786540582.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.git.1785998419.gitgitgadget@gmail.com","subject":"[PATCH v2 0/6] gitk: make color preferences visually more pleasing and better usable","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-12T13:16:15Z","receivedAt":"2026-08-12T13:16:26Z","isPatch":true,"body":"I find the user interface to set the color preferences a bit ugly for these\nreasons:\n\n * The color samples are not clickable as one would expect who enters the\n   dialog. Instead, the description is the button that must be clicked.\n\n * Since the descriptive texts are different for the preferences, the width\n   of the buttons are different, too.\n\n * The descriptions themselves are not always natural language (read: they\n   are nerdy) and use abbreviations.\n\nThis series makes the descriptions static text and turns the color samples\ninto the clickable buttons. It also makes the descriptions and dialog titles\nmore natural language.\n\nChanges since v1:\n\n * Apply a thicker border to the buttons and some vertical distance between\n   the lines.\n * Remove \"Diff\" from the labels, because they are sufficiently unambiguous\n   without.\n * Fine-tune the wording of the labels for better English.\n * Move selection and link colors above diff colors.\n * Tweak the commit messages.\n\nThis is the dialog before the change: Screenshot_color_buttons_before\n[https://github.com/user-attachments/assets/910a647f-4e56-47b0-b4c4-e6e7bc966e9c]\nAnd this is the dialog after the change: Screenshot_color_buttons_after_v2\n[https://github.com/user-attachments/assets/9c0fae28-727a-4bdd-9d76-36e276217322]\n\nJohannes Sixt (6):\n  gitk: set intitial colors of swatches using the available helper\n  gitk: condense repetitive code around color buttons into foreach loops\n  gitk: show color preferences on the button instead of the label\n  gitk: use more natural language for labels of color preferences\n  gitk: avoid constructing dialog titles from text pieces\n  gitk: move UI for generic colors above diff colors\n\n gitk-git/gitk | 123 ++++++++++++++++++++++++--------------------------\n 1 file changed, 59 insertions(+), 64 deletions(-)\n\n\nbase-commit: a97fcc37c2bc6340a8d7ce78dedf227aac4e9aa7\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2194%2Fj6t%2Fgitk-prefs-color-buttons-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2194/j6t/gitk-prefs-color-buttons-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/2194\n\nRange-diff vs v1:\n\n 1:  ab16ec6276 ! 1:  e7e62f428b gitk: set intitial colors of swatches using the available helper\n     @@ Commit message\n          gitk: set intitial colors of swatches using the available helper\n      \n          After the user has selected a color in the Preferences dialog, the\n     -    helper proc prefspage_set_colorswatches is used update the colors shown\n     -    in the Preferences dialog. Use this proc also after the Preferences\n     -    dialog is constructed to show the initial colors. This keeps the\n     +    helper proc prefspage_set_colorswatches is used to update the colors\n     +    shown in the Preferences dialog. Use this proc also to show the initial\n     +    colors after the Preferences dialog is constructed. This keeps the\n          procedure that gives the UI elements their colors in a single place.\n      \n          Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n 2:  edb567608e = 2:  52dacc4924 gitk: condense repetitive code around color buttons into foreach loops\n 3:  0428a92efc ! 3:  75202a52d7 gitk: show color preferences on the button instead of the label\n     @@ gitk-git/gitk: proc prefspage_colors {notebook} {\n      -        label $page.$uielem -padx 40 -relief sunk\n      -        ttk::button $page.${uielem}btn -text $label \\\n      +        ttk::label $page.$uielem -text $label\n     -+        button $page.${uielem}btn -padx 40 -pady 0 \\\n     ++        button $page.${uielem}btn -padx 40 -pady 0 -borderwidth 2 \\\n                   -command [list choosecolor $colorvar $idx $page $title]\n      -        grid x $page.${uielem}btn $page.$uielem -sticky w\n     -+        grid x $page.$uielem $page.${uielem}btn -sticky w\n     ++        grid x $page.$uielem $page.${uielem}btn -sticky w -pady 1\n           }\n       \n           grid columnconfigure $page 2 -weight 1\n 4:  ce417701a8 ! 4:  45d5b05281 gitk: use more natural language for labels of color preferences\n     @@ Commit message\n          gitk: use more natural language for labels of color preferences\n      \n          The labels used to be clickable buttons. These would have looked funny\n     -    if they carried long texts. For this reason, abbreviations and \"nerdy\"\n     -    texts were used to keep them short. Since these labels are now static\n     -    text, bring them closer to natural language.\n     +    if they carried long texts. For this reason, jargon and abbreviations\n     +    were used to keep them short. Since there is no button frame around the\n     +    labels anymore, the texts can become longer without becoming ugly.\n     +    Bring them closer to natural language.\n     +\n     +    Remove the prefix \"Diff\" from labels, because the remaining texts are\n     +    sufficiently unambiguous that they are about diff text.\n      \n          Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n      \n     @@ gitk-git/gitk: proc prefspage_colors {notebook} {\n      +                    [mc \"Main text\"] \\\n                           [mc \"foreground\"] \\\n               diffold     diffcolors 0 \\\n     -                     [mc \"Diff: old lines\"] \\\n     +-                    [mc \"Diff: old lines\"] \\\n     ++                    [mc \"Old line text\"] \\\n                           [mc \"diff old lines\"] \\\n               diffoldbg   diffbgcolors 0 \\\n      -                    [mc \"Diff: old lines bg\"] \\\n     -+                    [mc \"Diff: old lines background\"] \\\n     ++                    [mc \"Old line background\"] \\\n                           [mc \"diff old lines bg\"] \\\n               diffnew     diffcolors 1 \\\n     -                     [mc \"Diff: new lines\"] \\\n     +-                    [mc \"Diff: new lines\"] \\\n     ++                    [mc \"New line text\"] \\\n                           [mc \"diff new lines\"] \\\n               diffnewbg   diffbgcolors 1 \\\n      -                    [mc \"Diff: new lines bg\"] \\\n     -+                    [mc \"Diff: new lines background\"] \\\n     ++                    [mc \"New line background\"] \\\n                           [mc \"diff new lines bg\"] \\\n               hunksep     diffcolors 2 \\\n      -                    [mc \"Diff: hunk header\"] \\\n     -+                    [mc \"Diff: hunk headers\"] \\\n     ++                    [mc \"Hunk header text\"] \\\n                           [mc \"diff hunk header\"] \\\n               markbg      markbgcolor {} \\\n      -                    [mc \"Marked line bg\"] \\\n     -+                    [mc \"Marked lines background\"] \\\n     ++                    [mc \"Marked line background\"] \\\n                           [mc \"marked line background\"] \\\n               selbg       selectbgcolor {} \\\n      -                    [mc \"Select bg\"] \\\n 5:  1e1bcfaf5b ! 5:  697159c20e gitk: avoid constructing dialog titles from text pieces\n     @@ gitk-git/gitk: proc prefspage_colors {notebook} {\n      -                    [mc \"foreground\"] \\\n      +                    [mc \"choose main text color\"] \\\n               diffold     diffcolors 0 \\\n     -                     [mc \"Diff: old lines\"] \\\n     +                     [mc \"Old line text\"] \\\n      -                    [mc \"diff old lines\"] \\\n      +                    [mc \"choose text color of old lines\"] \\\n               diffoldbg   diffbgcolors 0 \\\n     -                     [mc \"Diff: old lines background\"] \\\n     +                     [mc \"Old line background\"] \\\n      -                    [mc \"diff old lines bg\"] \\\n      +                    [mc \"choose background color of old lines\"] \\\n               diffnew     diffcolors 1 \\\n     -                     [mc \"Diff: new lines\"] \\\n     +                     [mc \"New line text\"] \\\n      -                    [mc \"diff new lines\"] \\\n      +                    [mc \"choose text color of new lines\"] \\\n               diffnewbg   diffbgcolors 1 \\\n     -                     [mc \"Diff: new lines background\"] \\\n     +                     [mc \"New line background\"] \\\n      -                    [mc \"diff new lines bg\"] \\\n      +                    [mc \"choose background color of new lines\"] \\\n               hunksep     diffcolors 2 \\\n     -                     [mc \"Diff: hunk headers\"] \\\n     +                     [mc \"Hunk header text\"] \\\n      -                    [mc \"diff hunk header\"] \\\n     -+                    [mc \"choose hunk header color\"] \\\n     ++                    [mc \"choose text color of hunk headers\"] \\\n               markbg      markbgcolor {} \\\n     -                     [mc \"Marked lines background\"] \\\n     +                     [mc \"Marked line background\"] \\\n      -                    [mc \"marked line background\"] \\\n      +                    [mc \"choose background color of marked lines\"] \\\n               selbg       selectbgcolor {} \\\n -:  ---------- > 6:  36590e857d gitk: move UI for generic colors above diff colors\n\n-- \ngitgitgadget\n"},{"id":"550402","messageId":"e7e62f428b3f460f0849dd6095643a7769248f29.1786540582.git.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.v2.git.1786540582.gitgitgadget@gmail.com","subject":"[PATCH v2 1/6] gitk: set intitial colors of swatches using the available helper","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-12T13:16:16Z","receivedAt":"2026-08-12T13:16:28Z","isPatch":true,"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nAfter the user has selected a color in the Preferences dialog, the\nhelper proc prefspage_set_colorswatches is used to update the colors\nshown in the Preferences dialog. Use this proc also to show the initial\ncolors after the Preferences dialog is constructed. This keeps the\nprocedure that gives the UI elements their colors in a single place.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk-git/gitk | 25 ++++++++++++-------------\n 1 file changed, 12 insertions(+), 13 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 0f3571050b..f5eb963b86 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11801,8 +11801,6 @@ proc prefspage_general {notebook} {\n }\n \n proc prefspage_colors {notebook} {\n-    global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor\n-    global diffbgcolors linkfgcolor\n     global themeloader\n \n     set page [create_prefs_page $notebook.colors]\n@@ -11834,63 +11832,64 @@ proc prefspage_colors {notebook} {\n \n     ttk::label $page.cdisp -text [mc \"Colors: press to choose\"] -font mainfontbold\n     grid $page.cdisp - -sticky w -pady 10\n-    label $page.bg -padx 40 -relief sunk -background $bgcolor\n+    label $page.bg -padx 40 -relief sunk\n     ttk::button $page.bgbut -text [mc \"Background\"] \\\n         -command [list choosecolor bgcolor {} $page [mc \"background\"]]\n     grid x $page.bgbut $page.bg -sticky w\n \n-    label $page.fg -padx 40 -relief sunk -background $fgcolor\n+    label $page.fg -padx 40 -relief sunk\n     ttk::button $page.fgbut -text [mc \"Foreground\"] \\\n         -command [list choosecolor fgcolor {} $page [mc \"foreground\"]]\n     grid x $page.fgbut $page.fg -sticky w\n \n-    label $page.diffold -padx 40 -relief sunk -background [lindex $diffcolors 0]\n+    label $page.diffold -padx 40 -relief sunk\n     ttk::button $page.diffoldbut -text [mc \"Diff: old lines\"] \\\n         -command [list choosecolor diffcolors 0 $page [mc \"diff old lines\"]]\n     grid x $page.diffoldbut $page.diffold -sticky w\n \n-    label $page.diffoldbg -padx 40 -relief sunk -background [lindex $diffbgcolors 0]\n+    label $page.diffoldbg -padx 40 -relief sunk\n     ttk::button $page.diffoldbgbut -text [mc \"Diff: old lines bg\"] \\\n         -command [list choosecolor diffbgcolors 0 $page [mc \"diff old lines bg\"]]\n     grid x $page.diffoldbgbut $page.diffoldbg -sticky w\n \n-    label $page.diffnew -padx 40 -relief sunk -background [lindex $diffcolors 1]\n+    label $page.diffnew -padx 40 -relief sunk\n     ttk::button $page.diffnewbut -text [mc \"Diff: new lines\"] \\\n         -command [list choosecolor diffcolors 1 $page [mc \"diff new lines\"]]\n     grid x $page.diffnewbut $page.diffnew -sticky w\n \n-    label $page.diffnewbg -padx 40 -relief sunk -background [lindex $diffbgcolors 1]\n+    label $page.diffnewbg -padx 40 -relief sunk\n     ttk::button $page.diffnewbgbut -text [mc \"Diff: new lines bg\"] \\\n         -command [list choosecolor diffbgcolors 1 $page [mc \"diff new lines bg\"]]\n     grid x $page.diffnewbgbut $page.diffnewbg -sticky w\n \n-    label $page.hunksep -padx 40 -relief sunk -background [lindex $diffcolors 2]\n+    label $page.hunksep -padx 40 -relief sunk\n     ttk::button $page.hunksepbut -text [mc \"Diff: hunk header\"] \\\n         -command [list choosecolor diffcolors 2 $page [mc \"diff hunk header\"]]\n     grid x $page.hunksepbut $page.hunksep -sticky w\n \n-    label $page.markbgsep -padx 40 -relief sunk -background $markbgcolor\n+    label $page.markbgsep -padx 40 -relief sunk\n     ttk::button $page.markbgbut -text [mc \"Marked line bg\"] \\\n         -command [list choosecolor markbgcolor {} $page [mc \"marked line background\"]]\n     grid x $page.markbgbut $page.markbgsep -sticky w\n \n-    label $page.selbgsep -padx 40 -relief sunk -background $selectbgcolor\n+    label $page.selbgsep -padx 40 -relief sunk\n     ttk::button $page.selbgbut -text [mc \"Select bg\"] \\\n         -command [list choosecolor selectbgcolor {} $page [mc \"background\"]]\n     grid x $page.selbgbut $page.selbgsep -sticky w\n \n-    label $page.linkfg -padx 40 -relief sunk -background $linkfgcolor\n+    label $page.linkfg -padx 40 -relief sunk\n     ttk::button $page.linkfgbut -text [mc \"Link\"] \\\n         -command [list choosecolor linkfgcolor {} $page [mc \"link\"]]\n     grid x $page.linkfgbut $page.linkfg -sticky w\n \n     grid columnconfigure $page 2 -weight 1\n+    prefspage_set_colorswatches $page\n \n     return $page\n }\n \n proc prefspage_set_colorswatches {page} {\n-    global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor\n+    global bgcolor fgcolor diffcolors selectbgcolor markbgcolor\n     global diffbgcolors linkfgcolor\n \n     $page.bg configure -background $bgcolor\n-- \ngitgitgadget\n\n"},{"id":"550403","messageId":"52dacc4924163812f8c68399ba7b56b6352e815a.1786540582.git.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.v2.git.1786540582.gitgitgadget@gmail.com","subject":"[PATCH v2 2/6] gitk: condense repetitive code around color buttons into foreach loops","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-12T13:16:17Z","receivedAt":"2026-08-12T13:16:30Z","isPatch":true,"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nThe color selection elements in the Preferences dialog are set up in a\nvery uniform manner. The code doing that has grown in the past by simply\nmodifying a copy of a paragraph. Extract the varying parts into a list\nand then operate the repeating parts in a foreach loop. This helps a\nlater change where we want to set up the UI elements in a different way.\n\nChange the UI names \"markbgsep\" and \"selbgsep\" to drop the \"sep\", which\nhas obviously been left over by accident when \"hunksep\" was copied.\n\nChange the suffix \"but\" to \"btn\", which resonates a bit better when\nreading the code.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk-git/gitk | 114 ++++++++++++++++++++++++--------------------------\n 1 file changed, 55 insertions(+), 59 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex f5eb963b86..137940defb 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11832,55 +11832,46 @@ proc prefspage_colors {notebook} {\n \n     ttk::label $page.cdisp -text [mc \"Colors: press to choose\"] -font mainfontbold\n     grid $page.cdisp - -sticky w -pady 10\n-    label $page.bg -padx 40 -relief sunk\n-    ttk::button $page.bgbut -text [mc \"Background\"] \\\n-        -command [list choosecolor bgcolor {} $page [mc \"background\"]]\n-    grid x $page.bgbut $page.bg -sticky w\n-\n-    label $page.fg -padx 40 -relief sunk\n-    ttk::button $page.fgbut -text [mc \"Foreground\"] \\\n-        -command [list choosecolor fgcolor {} $page [mc \"foreground\"]]\n-    grid x $page.fgbut $page.fg -sticky w\n-\n-    label $page.diffold -padx 40 -relief sunk\n-    ttk::button $page.diffoldbut -text [mc \"Diff: old lines\"] \\\n-        -command [list choosecolor diffcolors 0 $page [mc \"diff old lines\"]]\n-    grid x $page.diffoldbut $page.diffold -sticky w\n-\n-    label $page.diffoldbg -padx 40 -relief sunk\n-    ttk::button $page.diffoldbgbut -text [mc \"Diff: old lines bg\"] \\\n-        -command [list choosecolor diffbgcolors 0 $page [mc \"diff old lines bg\"]]\n-    grid x $page.diffoldbgbut $page.diffoldbg -sticky w\n-\n-    label $page.diffnew -padx 40 -relief sunk\n-    ttk::button $page.diffnewbut -text [mc \"Diff: new lines\"] \\\n-        -command [list choosecolor diffcolors 1 $page [mc \"diff new lines\"]]\n-    grid x $page.diffnewbut $page.diffnew -sticky w\n-\n-    label $page.diffnewbg -padx 40 -relief sunk\n-    ttk::button $page.diffnewbgbut -text [mc \"Diff: new lines bg\"] \\\n-        -command [list choosecolor diffbgcolors 1 $page [mc \"diff new lines bg\"]]\n-    grid x $page.diffnewbgbut $page.diffnewbg -sticky w\n-\n-    label $page.hunksep -padx 40 -relief sunk\n-    ttk::button $page.hunksepbut -text [mc \"Diff: hunk header\"] \\\n-        -command [list choosecolor diffcolors 2 $page [mc \"diff hunk header\"]]\n-    grid x $page.hunksepbut $page.hunksep -sticky w\n-\n-    label $page.markbgsep -padx 40 -relief sunk\n-    ttk::button $page.markbgbut -text [mc \"Marked line bg\"] \\\n-        -command [list choosecolor markbgcolor {} $page [mc \"marked line background\"]]\n-    grid x $page.markbgbut $page.markbgsep -sticky w\n-\n-    label $page.selbgsep -padx 40 -relief sunk\n-    ttk::button $page.selbgbut -text [mc \"Select bg\"] \\\n-        -command [list choosecolor selectbgcolor {} $page [mc \"background\"]]\n-    grid x $page.selbgbut $page.selbgsep -sticky w\n-\n-    label $page.linkfg -padx 40 -relief sunk\n-    ttk::button $page.linkfgbut -text [mc \"Link\"] \\\n-        -command [list choosecolor linkfgcolor {} $page [mc \"link\"]]\n-    grid x $page.linkfgbut $page.linkfg -sticky w\n+\n+    set coloruielems [list \\\n+        bg          bgcolor {} \\\n+                    [mc \"Background\"] \\\n+                    [mc \"background\"] \\\n+        fg          fgcolor {} \\\n+                    [mc \"Foreground\"] \\\n+                    [mc \"foreground\"] \\\n+        diffold     diffcolors 0 \\\n+                    [mc \"Diff: old lines\"] \\\n+                    [mc \"diff old lines\"] \\\n+        diffoldbg   diffbgcolors 0 \\\n+                    [mc \"Diff: old lines bg\"] \\\n+                    [mc \"diff old lines bg\"] \\\n+        diffnew     diffcolors 1 \\\n+                    [mc \"Diff: new lines\"] \\\n+                    [mc \"diff new lines\"] \\\n+        diffnewbg   diffbgcolors 1 \\\n+                    [mc \"Diff: new lines bg\"] \\\n+                    [mc \"diff new lines bg\"] \\\n+        hunksep     diffcolors 2 \\\n+                    [mc \"Diff: hunk header\"] \\\n+                    [mc \"diff hunk header\"] \\\n+        markbg      markbgcolor {} \\\n+                    [mc \"Marked line bg\"] \\\n+                    [mc \"marked line background\"] \\\n+        selbg       selectbgcolor {} \\\n+                    [mc \"Select bg\"] \\\n+                    [mc \"background\"] \\\n+        linkfg      linkfgcolor {} \\\n+                    [mc \"Link\"] \\\n+                    [mc \"link\"] \\\n+    ]\n+\n+    foreach {uielem colorvar idx label title} $coloruielems {\n+        label $page.$uielem -padx 40 -relief sunk\n+        ttk::button $page.${uielem}btn -text $label \\\n+            -command [list choosecolor $colorvar $idx $page $title]\n+        grid x $page.${uielem}btn $page.$uielem -sticky w\n+    }\n \n     grid columnconfigure $page 2 -weight 1\n     prefspage_set_colorswatches $page\n@@ -11892,16 +11883,21 @@ proc prefspage_set_colorswatches {page} {\n     global bgcolor fgcolor diffcolors selectbgcolor markbgcolor\n     global diffbgcolors linkfgcolor\n \n-    $page.bg configure -background $bgcolor\n-    $page.fg configure -background $fgcolor\n-    $page.diffold configure -background [lindex $diffcolors 0]\n-    $page.diffoldbg configure -background [lindex $diffbgcolors 0]\n-    $page.diffnew configure -background [lindex $diffcolors 1]\n-    $page.diffnewbg configure -background [lindex $diffbgcolors 1]\n-    $page.hunksep configure -background [lindex $diffcolors 2]\n-    $page.markbgsep configure -background $markbgcolor\n-    $page.selbgsep configure -background $selectbgcolor\n-    $page.linkfg configure -background $linkfgcolor\n+    set coloruielems [list \\\n+        bg        $bgcolor \\\n+        fg        $fgcolor \\\n+        diffold   [lindex $diffcolors 0] \\\n+        diffoldbg [lindex $diffbgcolors 0] \\\n+        diffnew   [lindex $diffcolors 1] \\\n+        diffnewbg [lindex $diffbgcolors 1] \\\n+        hunksep   [lindex $diffcolors 2] \\\n+        markbg    $markbgcolor \\\n+        selbg     $selectbgcolor \\\n+        linkfg    $linkfgcolor \\\n+    ]\n+    foreach {uielem color} $coloruielems {\n+        $page.$uielem configure -background $color\n+    }\n }\n \n proc prefspage_fonts {notebook} {\n-- \ngitgitgadget\n\n"},{"id":"550404","messageId":"75202a52d7912e67f6b92662f5349127c26c70b7.1786540582.git.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.v2.git.1786540582.gitgitgadget@gmail.com","subject":"[PATCH v2 3/6] gitk: show color preferences on the button instead of the label","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-12T13:16:18Z","receivedAt":"2026-08-12T13:16:32Z","isPatch":true,"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nWhen the user goes to the color preferences, the eye is automatically\ndrawn to the color samples. However, clicking on the sample with the\nintent to change it does nothing. Instead, the text label also acts as\na button and must be clicked to change the color.\n\nTurn the color samples into clickable buttons and the text labels into\nstatic text. Use non-themed buttons because their color can be changed\nby simply specifying the color properties. (Themed buttons would need\na lot more elaboration.)\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk-git/gitk | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 137940defb..afc7c2d39d 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11867,10 +11867,10 @@ proc prefspage_colors {notebook} {\n     ]\n \n     foreach {uielem colorvar idx label title} $coloruielems {\n-        label $page.$uielem -padx 40 -relief sunk\n-        ttk::button $page.${uielem}btn -text $label \\\n+        ttk::label $page.$uielem -text $label\n+        button $page.${uielem}btn -padx 40 -pady 0 -borderwidth 2 \\\n             -command [list choosecolor $colorvar $idx $page $title]\n-        grid x $page.${uielem}btn $page.$uielem -sticky w\n+        grid x $page.$uielem $page.${uielem}btn -sticky w -pady 1\n     }\n \n     grid columnconfigure $page 2 -weight 1\n@@ -11896,7 +11896,7 @@ proc prefspage_set_colorswatches {page} {\n         linkfg    $linkfgcolor \\\n     ]\n     foreach {uielem color} $coloruielems {\n-        $page.$uielem configure -background $color\n+        $page.${uielem}btn configure -background $color -activebackground $color\n     }\n }\n \n-- \ngitgitgadget\n\n"},{"id":"550405","messageId":"45d5b05281cd4f3f43290d128d631a47975225f3.1786540582.git.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.v2.git.1786540582.gitgitgadget@gmail.com","subject":"[PATCH v2 4/6] gitk: use more natural language for labels of color preferences","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-12T13:16:19Z","receivedAt":"2026-08-12T13:16:34Z","isPatch":true,"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nThe labels used to be clickable buttons. These would have looked funny\nif they carried long texts. For this reason, jargon and abbreviations\nwere used to keep them short. Since there is no button frame around the\nlabels anymore, the texts can become longer without becoming ugly.\nBring them closer to natural language.\n\nRemove the prefix \"Diff\" from labels, because the remaining texts are\nsufficiently unambiguous that they are about diff text.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk-git/gitk | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex afc7c2d39d..c0ab55845b 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11838,31 +11838,31 @@ proc prefspage_colors {notebook} {\n                     [mc \"Background\"] \\\n                     [mc \"background\"] \\\n         fg          fgcolor {} \\\n-                    [mc \"Foreground\"] \\\n+                    [mc \"Main text\"] \\\n                     [mc \"foreground\"] \\\n         diffold     diffcolors 0 \\\n-                    [mc \"Diff: old lines\"] \\\n+                    [mc \"Old line text\"] \\\n                     [mc \"diff old lines\"] \\\n         diffoldbg   diffbgcolors 0 \\\n-                    [mc \"Diff: old lines bg\"] \\\n+                    [mc \"Old line background\"] \\\n                     [mc \"diff old lines bg\"] \\\n         diffnew     diffcolors 1 \\\n-                    [mc \"Diff: new lines\"] \\\n+                    [mc \"New line text\"] \\\n                     [mc \"diff new lines\"] \\\n         diffnewbg   diffbgcolors 1 \\\n-                    [mc \"Diff: new lines bg\"] \\\n+                    [mc \"New line background\"] \\\n                     [mc \"diff new lines bg\"] \\\n         hunksep     diffcolors 2 \\\n-                    [mc \"Diff: hunk header\"] \\\n+                    [mc \"Hunk header text\"] \\\n                     [mc \"diff hunk header\"] \\\n         markbg      markbgcolor {} \\\n-                    [mc \"Marked line bg\"] \\\n+                    [mc \"Marked line background\"] \\\n                     [mc \"marked line background\"] \\\n         selbg       selectbgcolor {} \\\n-                    [mc \"Select bg\"] \\\n+                    [mc \"Selected text background\"] \\\n                     [mc \"background\"] \\\n         linkfg      linkfgcolor {} \\\n-                    [mc \"Link\"] \\\n+                    [mc \"Link text\"] \\\n                     [mc \"link\"] \\\n     ]\n \n-- \ngitgitgadget\n\n"},{"id":"550406","messageId":"697159c20e9903dc720d8afdd6535007e61fa095.1786540582.git.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.v2.git.1786540582.gitgitgadget@gmail.com","subject":"[PATCH v2 5/6] gitk: avoid constructing dialog titles from text pieces","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-12T13:16:20Z","receivedAt":"2026-08-12T13:16:35Z","isPatch":true,"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nWhen the user clicks a color preference, a color selection dialog is\npresented whose title is provided in parts by the caller. The dialog\nimplementation must supply the rest of the title. This is unfriendly\nfor translations. Provide the full title by the caller. Rewrite the\ntexts to be more natural language.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk-git/gitk | 24 ++++++++++++------------\n 1 file changed, 12 insertions(+), 12 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex c0ab55845b..d4c229a3c0 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11836,34 +11836,34 @@ proc prefspage_colors {notebook} {\n     set coloruielems [list \\\n         bg          bgcolor {} \\\n                     [mc \"Background\"] \\\n-                    [mc \"background\"] \\\n+                    [mc \"choose background color\"] \\\n         fg          fgcolor {} \\\n                     [mc \"Main text\"] \\\n-                    [mc \"foreground\"] \\\n+                    [mc \"choose main text color\"] \\\n         diffold     diffcolors 0 \\\n                     [mc \"Old line text\"] \\\n-                    [mc \"diff old lines\"] \\\n+                    [mc \"choose text color of old lines\"] \\\n         diffoldbg   diffbgcolors 0 \\\n                     [mc \"Old line background\"] \\\n-                    [mc \"diff old lines bg\"] \\\n+                    [mc \"choose background color of old lines\"] \\\n         diffnew     diffcolors 1 \\\n                     [mc \"New line text\"] \\\n-                    [mc \"diff new lines\"] \\\n+                    [mc \"choose text color of new lines\"] \\\n         diffnewbg   diffbgcolors 1 \\\n                     [mc \"New line background\"] \\\n-                    [mc \"diff new lines bg\"] \\\n+                    [mc \"choose background color of new lines\"] \\\n         hunksep     diffcolors 2 \\\n                     [mc \"Hunk header text\"] \\\n-                    [mc \"diff hunk header\"] \\\n+                    [mc \"choose text color of hunk headers\"] \\\n         markbg      markbgcolor {} \\\n                     [mc \"Marked line background\"] \\\n-                    [mc \"marked line background\"] \\\n+                    [mc \"choose background color of marked lines\"] \\\n         selbg       selectbgcolor {} \\\n                     [mc \"Selected text background\"] \\\n-                    [mc \"background\"] \\\n+                    [mc \"choose background color of selected text\"] \\\n         linkfg      linkfgcolor {} \\\n                     [mc \"Link text\"] \\\n-                    [mc \"link\"] \\\n+                    [mc \"choose color of link text\"] \\\n     ]\n \n     foreach {uielem colorvar idx label title} $coloruielems {\n@@ -12014,11 +12014,11 @@ proc choose_themeloader {prefspage} {\n     }\n }\n \n-proc choosecolor {v vi prefspage x} {\n+proc choosecolor {v vi prefspage title} {\n     global $v\n \n     set c [tk_chooseColor -initialcolor [lindex [set $v] $vi] \\\n-               -title [mc \"Gitk: choose color for %s\" $x]]\n+               -title \"Gitk: $title\"]\n     if {$c eq {}} return\n     lset $v $vi $c\n     set_gui_colors\n-- \ngitgitgadget\n\n"},{"id":"550407","messageId":"36590e857d3c9a83b17f32b5790df2bd6c1cb588.1786540582.git.gitgitgadget@gmail.com","threadId":"66127","inReplyTo":"pull.2194.v2.git.1786540582.gitgitgadget@gmail.com","subject":"[PATCH v2 6/6] gitk: move UI for generic colors above diff colors","fromName":"Johannes Sixt via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-08-12T13:16:21Z","receivedAt":"2026-08-12T13:16:36Z","isPatch":true,"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nThe selection and link colors apply not only to the diff panel, but also\nto the the commit list. Move these right after the generic background\nand text color options.\n\nThe color for marked lines is only used in the diff panel, hence, leave\nit below the diff color options.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk-git/gitk | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex d4c229a3c0..9506739c50 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11840,6 +11840,12 @@ proc prefspage_colors {notebook} {\n         fg          fgcolor {} \\\n                     [mc \"Main text\"] \\\n                     [mc \"choose main text color\"] \\\n+        selbg       selectbgcolor {} \\\n+                    [mc \"Selected text background\"] \\\n+                    [mc \"choose background color of selected text\"] \\\n+        linkfg      linkfgcolor {} \\\n+                    [mc \"Link text\"] \\\n+                    [mc \"choose color of link text\"] \\\n         diffold     diffcolors 0 \\\n                     [mc \"Old line text\"] \\\n                     [mc \"choose text color of old lines\"] \\\n@@ -11858,12 +11864,6 @@ proc prefspage_colors {notebook} {\n         markbg      markbgcolor {} \\\n                     [mc \"Marked line background\"] \\\n                     [mc \"choose background color of marked lines\"] \\\n-        selbg       selectbgcolor {} \\\n-                    [mc \"Selected text background\"] \\\n-                    [mc \"choose background color of selected text\"] \\\n-        linkfg      linkfgcolor {} \\\n-                    [mc \"Link text\"] \\\n-                    [mc \"choose color of link text\"] \\\n     ]\n \n     foreach {uielem colorvar idx label title} $coloruielems {\n-- \ngitgitgadget\n"},{"id":"550538","messageId":"787b9472-d9ac-4d1f-814c-f7be9318ff55@gmail.com","threadId":"66127","inReplyTo":"45d5b05281cd4f3f43290d128d631a47975225f3.1786540582.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 4/6] gitk: use more natural language for labels of color preferences","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2026-08-13T17:00:40Z","receivedAt":"2026-08-13T17:00:45Z","isPatch":true,"body":"\n\nOn 8/12/26 9:16 AM, Johannes Sixt via GitGitGadget wrote:\n>          markbg      markbgcolor {} \\\n> -                    [mc \"Marked line bg\"] \\\n> +                    [mc \"Marked line background\"] \\\n>                      [mc \"marked line background\"] \\\n>\n\nNot a new issue, but \"marked line\" is not a good description. What this actually controls\nis the background color of commit message text found by search criteria in the gui, not\nlines of text, and (as far as I can tell) never any text found in the patch text.\n\nSo, perhaps my observation is best deferred as being part of a different topic that would\nmake the search function highlight all matches, not just those in the commit message.\n\nMark\n"},{"id":"550539","messageId":"9b7d3630-6584-425d-9927-849dd764cd6d@gmail.com","threadId":"66127","inReplyTo":"75202a52d7912e67f6b92662f5349127c26c70b7.1786540582.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 3/6] gitk: show color preferences on the button instead of the label","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2026-08-13T17:00:53Z","receivedAt":"2026-08-13T17:00:56Z","isPatch":true,"body":"\n\nOn 8/12/26 9:16 AM, Johannes Sixt via GitGitGadget wrote:\n> -        label $page.$uielem -padx 40 -relief sunk\n> -        ttk::button $page.${uielem}btn -text $label \\\n> +        ttk::label $page.$uielem -text $label\n> +        button $page.${uielem}btn -padx 40 -pady 0 -borderwidth 2 \\\n>              -command [list choosecolor $colorvar $idx $page $title]\n>  \nThis does make the new buttons stand out much better. Good.\n\nMark\n"},{"id":"550566","messageId":"d6754ded-89f6-48e9-9755-24c45c90845f@kdbg.org","threadId":"66127","inReplyTo":"787b9472-d9ac-4d1f-814c-f7be9318ff55@gmail.com","subject":"Re: [PATCH v2 4/6] gitk: use more natural language for labels of color preferences","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2026-08-13T19:35:46Z","receivedAt":"2026-08-13T19:35:56Z","isPatch":true,"body":"Am 13.08.26 um 19:00 schrieb Mark Levedahl:\n> On 8/12/26 9:16 AM, Johannes Sixt via GitGitGadget wrote:\n>>          markbg      markbgcolor {} \\\n>> -                    [mc \"Marked line bg\"] \\\n>> +                    [mc \"Marked line background\"] \\\n>>                      [mc \"marked line background\"] \\\n>>\n> \n> Not a new issue, but \"marked line\" is not a good description. What this actually controls\n> is the background color of commit message text found by search criteria in the gui, not\n> lines of text, and (as far as I can tell) never any text found in the patch text.\nActually, it is the background color of lines found via \"Show origin of\nthis line\" in the diff panel.\n\nWhen reading this code for the first time, I thought it has to do with\nthe \"Mark this commit\" in the commit list, but it doesn't.\n\n-- Hannes\n\n"},{"id":"550574","messageId":"6da65615-0870-402d-8630-9b486b512947@gmail.com","threadId":"66127","inReplyTo":"d6754ded-89f6-48e9-9755-24c45c90845f@kdbg.org","subject":"Re: [PATCH v2 4/6] gitk: use more natural language for labels of color preferences","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2026-08-13T20:11:08Z","receivedAt":"2026-08-13T20:11:13Z","isPatch":true,"body":"\n\nOn 8/13/26 3:35 PM, Johannes Sixt wrote:\n> Am 13.08.26 um 19:00 schrieb Mark Levedahl:\n>> On 8/12/26 9:16 AM, Johannes Sixt via GitGitGadget wrote:\n>>>          markbg      markbgcolor {} \\\n>>> -                    [mc \"Marked line bg\"] \\\n>>> +                    [mc \"Marked line background\"] \\\n>>>                      [mc \"marked line background\"] \\\n>>>\n>> Not a new issue, but \"marked line\" is not a good description. What this actually controls\n>> is the background color of commit message text found by search criteria in the gui, not\n>> lines of text, and (as far as I can tell) never any text found in the patch text.\n> Actually, it is the background color of lines found via \"Show origin of\n> this line\" in the diff panel.\n>\n> When reading this code for the first time, I thought it has to do with\n> the \"Mark this commit\" in the commit list, but it doesn't.\n>\n> -- Hannes\n\nSorry, yes you are right, I confused myself. \n- Maybe \"Marked line background\"  should be something including \"origin\" hinting at the\nmenu item triggering it, e.g., \"Origin line background\"?\n\nThe highlight color associated with the problem I noted (gitk highlights text found in the\ncommit message, but not in the commits), is \"foundbgcolor\" in the config file, and is not\non the config page. There are many colors in the config file but not on the config page:\nas long as no one is complaining, I'd leave that as-is.\n\nMark\n\n, \n"}]}