git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: Stefan Dotterweich <stefandotterweich@gmx.de>, git@vger.kernel.org
Subject: [PATCH] gitk: Un-hide selection in added and removed text and search results
Date: Wed, 8 Apr 2020 20:36:25 +0200	[thread overview]
Message-ID: <2ecfbb59-3a65-9db0-4ff7-e649ab6dfb6e@kdbg.org> (raw)
In-Reply-To: <8b5b8d89-59c2-7349-25c1-2529db13fa6e@kdbg.org>

The recently introduced background for the tags that highlight
added and removed text takes precedence over the background color
of the selection. But selected text is more important than the
highlighted text. Make the highlighting tags the lowest priority.

The same argument holds for the highlight of search results. But
search results are a bit more important. Therefore, make them
also low-priority, but just above the added-and-removed tags.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
Am 07.04.20 um 18:42 schrieb Johannes Sixt:
> There is one major gripe, though: the new background color overrides the
> selection background and makes the selection invisible. This is a
> showstopper.

Here is a fix for that on top of Stefan's patch. The patch text works
without Stefan's patch (and would un-hide the selection in search
results), but the commit message would have to be adjusted.

-- Hannes

 gitk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gitk b/gitk
index 4129c0ba95..d4dd9aca64 100755
--- a/gitk
+++ b/gitk
@@ -2468,6 +2468,11 @@ proc makewindow {} {
     $ctext tag conf currentsearchhit -back $currentsearchhitbgcolor
     $ctext tag conf wwrap -wrap word -lmargin2 1c
     $ctext tag conf bold -font textfontbold
+    # set these to the lowest priority:
+    $ctext tag lower currentsearchhit
+    $ctext tag lower found
+    $ctext tag lower dresult
+    $ctext tag lower d0
 
     .pwbottom add .bleft
     if {!$use_ttk} {
-- 
2.26.0.207.gdeb9c6cae9

  reply	other threads:[~2020-04-08 18:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 21:24 [PATCH] gitk: add diff lines background colors Stefan Dotterweich
2020-04-07 16:42 ` Johannes Sixt
2020-04-08 18:36   ` Johannes Sixt [this message]
2020-04-09 17:48     ` [PATCH v2] gitk: Un-hide selection in areas with non-default background color Johannes Sixt

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ecfbb59-3a65-9db0-4ff7-e649ab6dfb6e@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=paulus@ozlabs.org \
    --cc=stefandotterweich@gmx.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).