]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/lcolorcache.C
rename LFUN enum values according to their command (as used in th minibuffer/bind...
[lyx.git] / src / frontends / qt4 / lcolorcache.C
index 9f7dfa1767ab498dddd5d8cc66adc17c6bf0c832..eeb1102925ab7a798b2b355c13261e0e537e1f1e 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <config.h>
 
+#include "Color.h"
 #include "lcolorcache.h"
 
 #include "LColor.h"
@@ -20,6 +21,7 @@ const QColor grey40(0x66, 0x66, 0x66);
 const QColor grey60(0x99, 0x99, 0x99);
 const QColor grey80(0xcc, 0xcc, 0xcc);
 const QColor grey90(0xe5, 0xe5, 0xe5);
+const QColor none = Qt::black;
 
 
 LColorCache::LColorCache()
@@ -40,6 +42,8 @@ QColor const & LColorCache::get(LColor_color col) const
                colormap[col] = grey80;
        else if (lcolor.getX11Name(col) == "grey90")
                colormap[col] = grey90;
+       else if (lcolor.getX11Name(col) == "none")
+               colormap[col] = none;
        else
                colormap[col] = QColor(lcolor.getX11Name(col).c_str());
 
@@ -51,3 +55,9 @@ void LColorCache::clear()
 {
        colormap.clear();
 }
+
+
+QColor const rgb2qcolor(lyx::RGBColor const & rgb)
+{
+       return QColor(rgb.r, rgb.g, rgb.b);
+}