[LyX/master] Upgrade ColorSet class to be based on 32bit colors
Koji Yokota
yokota6 at gmail.com
Thu Jun 4 16:57:40 UTC 2026
> 2026/06/03 18:35、Enrico Forestieri <forenr at lyx.org>のメール:
>
> On Tue, Jun 02, 2026 at 04:51:32AM +0000, Koji Yokota wrote:
>> commit abdb06e5f64f1d6f78bdd58552b8d2bf3c63db3f
>> Author: Koji Yokota <yokota at lyx.org>
>> Date: Sun May 31 22:03:22 2026 +0900
>>
>> Upgrade ColorSet class to be based on 32bit colors
>> ---
>> src/Color.cpp | 270 +++++++++++++++++++++++++---------------
>> src/Color.h | 7 +-
>> src/ColorSet.h | 26 ++--
>> src/LyXRC.cpp | 8 +-
>> src/frontends/qt/ColorCache.cpp | 8 +-
>> src/frontends/qt/GuiPrefs.cpp | 2 +-
>> 6 files changed, 202 insertions(+), 119 deletions(-)
>>
>> diff --git a/src/Color.cpp b/src/Color.cpp
>> index 6c3387fe41..f277de10b4 100644
>> --- a/src/Color.cpp
>> +++ b/src/Color.cpp
> [snip]
>> @@ -468,15 +522,30 @@ bool ColorSet::setColor(ColorCode col, string const & x11hexname,
>> return false;
>> }
>>
>> - if (!x11hexname.empty())
>> - it->second.x11hexname = x11hexname;
>> - it->second.x11darkhexname = (x11darkhexname.empty()) ? x11hexname : x11darkhexname;
>> + LASSERT((hexname.empty()
>> + || ((hexname.size() == 7 || hexname.size() == 9)
>> + && hexname[0] == '#'))
>> + && (darkhexname.empty()
>> + || ((darkhexname.size() == 7 || darkhexname.size() == 9)
>> + && darkhexname[0] == '#')),
>> + return true);
>
> Please, note that this assertion triggers when you (for example) have
> \set_color "note" "DarkGoldenrod"
> in the preferences.
Thanks, Enrico. I ignored the case that named colors are specified.
Fixed in #7344638.
Koji
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20260605/d578f72d/attachment.htm>
More information about the lyx-devel
mailing list