On 05/12/2015 07:08 PM, Uwe Stöhr wrote:
Dear LyXers,
it annoyed me a long time that LyX does only provide the most basic
colors in the character dialog and that these colors are not even
displayed there.
(For example I use the color "lime" quite frequently and had therefore
to use TeX code.)
I thought about this and offering all possible rgb colors would be a
nightmare because this will pollute the TeX output with color
definitions and a strength of TeX is to provide a well-structured
output. So providing only a basic set of colors makes sense.
Since we support the package xcolor for a long time we could expand
our color list with the standard fonts of xcolor.
This is done in the attached patch. The patch also displays the colors
in the dialog. It contains also the necessary tex2lyx changes. I will
of course add lyx2lyx when going on.
OK to go on?
Seems reasonable enough to me.
Check for whitespace errors here:
diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp
index 995f8fa..7c5f236 100644
--- a/src/frontends/qt4/GuiPrefs.cpp
+++ b/src/frontends/qt4/GuiPrefs.cpp
@@ -1121,11 +1121,22 @@ PrefColors::PrefColors(GuiPreferences * form)
if (lc == Color_none
|| lc == Color_black
|| lc == Color_white
- || lc == Color_red
+ || lc == Color_blue
+ || lc == Color_brown
+ || lc == Color_cyan
+ || lc == Color_darkgray
+ || lc == Color_gray
|| lc == Color_green
- || lc == Color_blue
- || lc == Color_cyan
+ || lc == Color_lightgray
+ || lc == Color_lime
|| lc == Color_magenta
+ || lc == Color_olive
+ || lc == Color_orange
+ || lc == Color_pink
+ || lc == Color_purple
+ || lc == Color_red
+ || lc == Color_teal
+ || lc == Color_violet
|| lc == Color_yellow
|| lc == Color_inherit
|| lc == Color_ignore)
rh