From f337481d17838e45020e4ce70e74181adc1cba89 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 13 Oct 2021 16:11:46 +0300 Subject: improved default selection colors and made them configurable via color.tes * NOTE: Selections are currently only used to highlight search results. * The default selection colors were not always visible well with default settings (--no-profile) and they were not uniform across platforms. On Curses, the selection would be reversed, while on Gtk it had a lighter foreground color. They are now always reversed (black on white background). The default styles do not assume any color support - they use only black and white. * Since these defaults cannot possibly work on every color scheme, color.selfore and color.selback has been added to color.tes. All existing color schemes have been updated to configure selections as reversed to the default colors. This especially fixes selection colors on Gtk. * On solarized.tes, the caret style was already distinct from inversed default colors. On terminal.tes, the color of the caret is now bright white, so it stands out from the selection colors. * In Curses, the caret color is currently __not__ applied to the command line where it is continued to be drawn reversed. The command line drawing code is considered deprecated and will eventually be replaced with a Scintilla minibuffer. * In Gtk, we now apply the caret style to the commandline view as well. * Fixed the comment color in solarized.light. --- lib/color.tes | 2 ++ lib/colors/solarized.tes | 6 +++++- lib/colors/terminal.tes | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/color.tes b/lib/color.tes index 633df8c..23c14f3 100644 --- a/lib/color.tes +++ b/lib/color.tes @@ -42,6 +42,8 @@ Q[color.caretfore]ESSETCARETFORE Q[color.caretline]ESSETCARETLINEBACK 1ESSETCARETLINEVISIBLE + Q[color.selfore],1ESSETSELFORE + Q[color.selback],1ESSETSELBACK ! Calltips and popup windows ! :M[color.calltip],38M[color.set] ! Set up brace lightning ! diff --git a/lib/colors/solarized.tes b/lib/colors/solarized.tes index bc6400c..7479c31 100644 --- a/lib/colors/solarized.tes +++ b/lib/colors/solarized.tes @@ -59,10 +59,12 @@ [color.linenumber] 0,Q[color.base2],Q[color.base00]  Q[color.base2]U[color.caretline] Q[color.base01]U[color.caretfore] + Q[color.base3]U[color.selfore] + Q[color.base00]U[color.selback] [color.calltip] 0,Q[color.base01],Q[color.base2]  - [color.comment] 2,Q[color.base3],Q[color.base01]  + [color.comment] 2,Q[color.base3],Q[color.base1]  [color.number] 0,Q[color.base3],Q[color.cyan]  [color.keyword] 0,Q[color.base3],Q[color.green]  [color.string] 0,Q[color.base3],Q[color.cyan]  @@ -90,6 +92,8 @@ [color.linenumber] 0,Q[color.base02],Q[color.base0]  Q[color.base02]U[color.caretline] Q[color.base1]U[color.caretfore] + Q[color.base03]U[color.selfore] + Q[color.base0]U[color.selback] [color.calltip] 0,Q[color.base1],Q[color.base02]  diff --git a/lib/colors/terminal.tes b/lib/colors/terminal.tes index aa146bc..43b67c7 100644 --- a/lib/colors/terminal.tes +++ b/lib/colors/terminal.tes @@ -2,7 +2,9 @@ [color.default] 0,Q[color.black],Q[color.white]  [color.linenumber] 0,Q[color.black],Q[color.white]  Q[color.black]U[color.caretline] -Q[color.white]U[color.caretfore] +Q[color.lwhite]U[color.caretfore] +Q[color.black]U[color.selfore] +Q[color.white]U[color.selback] [color.calltip] 0,Q[color.lwhite],Q[color.black]  -- cgit v1.2.3