]> git.ipfire.org Git - thirdparty/git.git/commit
gitk: restore ui colors after cancelling config dialog
authorMark Levedahl <mlevedahl@gmail.com>
Fri, 6 Jun 2025 15:34:04 +0000 (11:34 -0400)
committerMark Levedahl <mlevedahl@gmail.com>
Thu, 17 Jul 2025 03:01:51 +0000 (23:01 -0400)
commitfdaba070bcbadd902610c09707802d0a1e2d3201
treec1952bb008256953678c7dbb427cada2526547ce
parent100f597b8833c55bdac70e9c2066d9ee36e0b6cb
gitk: restore ui colors after cancelling config dialog

gitk provides a dialog to configure many ui colors. Any color element
changed in the dialog takes immediate effect before closing the dialog.
While cancelling the dialog after changing one or more colors avoids
saving the modified colors, the user must restart gitk to restore the
prior color set. This unfortunate behavior results because gitk does not
have a single routine to update all of the ui colors. The prior commit
eliminated the key impediment to having such a routine. So, let's create
a routine to update all configured colors at once, use this when
modifying colors, and also invoke this after restoring the prior set if
the dialog is cancelled.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
gitk