Abdelrazak Younes a écrit :
Georg Baum a écrit :
Am Dienstag, 21. März 2006 14:12 schrieb Angus Leeming:
There's an RGBColor class (and an HSVColor one too) in the XForms
frontend.
Please move 'em someplace useful.
Nice, I stumbled about RGBColor but thought it was an xforms thing.
The attached patch moves these classes to the core, and changes Branch
to store a RGBColor instead of a string. The consequence is that a
branch cannot have a "none" color anymore, and therefore some checks
in the frontend are not necessary anymore. LColor::background is used
now instead of "none". This is consistent with the current display of
branches with "none" color.
What do you think?
The patch looks good but I am wondering if this solution is not a bit
too complicated. Why not just define some const string in hexa and let
the frontend take care of the rest?
Just for clarification, this would mean replacing x11name by this RGB
value in ColorEntry:
class ColorEntry {
ColorEntry(
string rgb_hexa = "#000000",
string const guiname_ = "",
string const latexname_ = "",
string const lyxname_ = "");
string const & get_rbg() const;
void set_rbg(string const & rgb_hexa);
private:
string rgb_;
string const guiname_;
string const latexname_;
string const lyxname_;
};
The LColor::color type could be used as an index for a
std::vector<ColorEntry>
Abdel.