From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11731 invoked by alias); 14 Mar 2019 20:10:05 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 11719 invoked by uid 89); 14 Mar 2019 20:10:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=screenshots, H*M:225a X-HELO: mail-wr1-f68.google.com Received: from mail-wr1-f68.google.com (HELO mail-wr1-f68.google.com) (209.85.221.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Mar 2019 20:10:03 +0000 Received: by mail-wr1-f68.google.com with SMTP id i8so7265590wrm.0 for ; Thu, 14 Mar 2019 13:10:03 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id j128sm17764wmb.43.2019.03.14.13.10.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 13:10:01 -0700 (PDT) Subject: Re: [PATCH] Improve/fix the TUI's current source line highlight To: John Baldwin , GDB Patches , Tom Tromey , Eli Zaretskii References: <6ada07d6-ff84-e215-19ff-0a17563390c6@redhat.com> <9c145336-7474-9599-5f00-bc069e36c490@FreeBSD.org> From: Pedro Alves Message-ID: <6f85cf65-7eac-225a-6b25-1188b65fad70@redhat.com> Date: Thu, 14 Mar 2019 20:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <9c145336-7474-9599-5f00-bc069e36c490@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-03/txt/msg00300.txt.bz2 -- Thanks, Pedro Alves On 03/14/2019 07:55 PM, John Baldwin wrote: > On 3/14/19 10:47 AM, Pedro Alves wrote: >> [trying again, this time with a tar.gz. sourceware rejected the image/pngs >> content type...] >> >> With styling enabled, I think the way we display the TUI's >> highlighted/current line is very ugly and distracting. At least, >> I can't seem to get used to it. The problem in my view is that we >> reverse foreground/background in colored text as well, leading to >> a fuzzy rainbow of colors. >> >> This patch changes that to something that I find much more sensible -- >> only reverse the default foreground/background colors, leave styled >> text colors alone. If the foreground color is not the default (because the >> text was styled), leave the foreground color as is. If >> e.g., the terminal is fg=BLACK, and bg=WHITE, and the style wants to >> print text in RED, reverse the background color (print in BLACK), but >> still print the text in RED. >> >> I've attached screenshots of before/after patch, with both >> white-on-black (actually, linux-colors / grey-ish-on-black), >> and black-on-white themes in my console (konsole). Also attached >> screenshots with styling disabled, so that you can see how the >> after-patch versions look more like the unstyled output. >> >> Note: The new ui_file_style::set_fg method isn't called set_foreground >> instead, because set_foreground is a macro in /usr/lib/term.h (ncurses). >> >> WDYT? > > I prefer your version over the current approach. I think we've decided > to forgo the idea, but if we had light and dark "themes" it would perhaps > make sense to use the other "theme" colors for the highlight bar. Your > version is pretty close to that with the current single "theme". One advantage of this approach over a highlight bar of some determined color, is that this saves one color. I.e., it reduces need to worry about the highlight bar color being the same as the color of something else, in which case I think that something else would become invisible when highlighted. The foreground/background colors are pretty much guaranteed to be quite apart contrast-wise, so I think it should work fine whatever the theme. At least it looks fine to me in all the themes konsole comes with (konsole's theme dialog changes the theme on the spot, and you can see the effect immediately, no need to restart gdb). Thanks, Pedro Alves