This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve/fix the TUI's current source line highlight


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".

-- 
John Baldwin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]