commit 2b3e1eee7fe078261782c7ed3e3b074fec9447f5
Author: Koji Yokota <[email protected]>
Date:   Sun Jun 7 13:31:20 2026 +0900

    Separate an overload function from Color::X11hexname
---
 src/BranchList.cpp               | 4 ++--
 src/BufferParams.cpp             | 2 +-
 src/Color.cpp                    | 2 +-
 src/Color.h                      | 2 +-
 src/frontends/qt/GuiDocument.cpp | 8 ++++----
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/BranchList.cpp b/src/BranchList.cpp
index 66b5bbc3bb..e8b9f8f4fe 100644
--- a/src/BranchList.cpp
+++ b/src/BranchList.cpp
@@ -104,11 +104,11 @@ void Branch::setColor(string const & col)
 void Branch::setColors(string const & lmcol, string const & dmcol)
 {
        if (lmcol.empty() && lmcolor_ == "background" && 
support::prefixIs(dmcol, "#"))
-               lmcolor_ = X11hexname(inverseARGBColor(argbFromHexName(dmcol)));
+               lmcolor_ = hex32name(inverseARGBColor(argbFromHexName(dmcol)));
        else if (!lmcol.empty())
                lmcolor_ = lmcol;
        if (dmcol.empty() && dmcolor_ == "background" && 
support::prefixIs(lmcol, "#"))
-               dmcolor_ = X11hexname(inverseARGBColor(argbFromHexName(lmcol)));
+               dmcolor_ = hex32name(inverseARGBColor(argbFromHexName(lmcol)));
        else if (!dmcol.empty())
                dmcolor_ = dmcol;
 
diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 92bbe4d576..833e7f72ae 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -1830,7 +1830,7 @@ void BufferParams::writeFile(ostream & os, Buffer const * 
buf) const
        for (auto const & id : indiceslist()) {
                os << "\\index " << to_utf8(id.index())
                   << "\n\\shortcut " << to_utf8(id.shortcut())
-                  << "\n\\color " << lyx::X11hexname(id.color())
+                  << "\n\\color " << lyx::hex32name(id.color())
                   << "\n\\end_index"
                   << "\n";
        }
diff --git a/src/Color.cpp b/src/Color.cpp
index df20600729..3d4716f463 100644
--- a/src/Color.cpp
+++ b/src/Color.cpp
@@ -77,7 +77,7 @@ string const X11hexname(RGBColor const & col)
 }
 
 
-string const X11hexname(ARGBColor const & col)
+string const hex32name(ARGBColor const & col)
 {
        ostringstream ostr;
 
diff --git a/src/Color.h b/src/Color.h
index 186f16563d..f2718a1647 100644
--- a/src/Color.h
+++ b/src/Color.h
@@ -60,7 +60,7 @@ public:
 std::ostream & operator<<(std::ostream & os, Color color);
 
 std::string const X11hexname(RGBColor const & col);
-std::string const X11hexname(ARGBColor const & col);
+std::string const hex32name(ARGBColor const & col);
 /// Returns RGBColor from 16- or 32-bit hex name
 /// Alpha value is omitted for 32-bit hex name
 RGBColor rgbFromHexName(std::string const & hexname);
diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index e800a5603c..a46d21aee2 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -5358,9 +5358,9 @@ void GuiDocument::dispatchParams()
                                argbcol = lyx::argbFromHexName(bcolor);
                        else
                                
guiApp->getArgbColor(lcolor.getFromLyXName(bcolor), argbcol);
-                       string const x11hexname = X11hexname(argbcol);
+                       string const hex32name = lyx::hex32name(argbcol);
                        // display the new color
-                       docstring const str = current_branch + ' ' + 
from_ascii(x11hexname);
+                       docstring const str = current_branch + ' ' + 
from_ascii(hex32name);
                        dispatch(FuncRequest(LFUN_SET_COLOR, str));
                }
        }
@@ -5377,9 +5377,9 @@ void GuiDocument::dispatchParams()
                for (; it != end; ++it) {
                        docstring const & current_index = it->shortcut();
                        Index const * index = 
indiceslist.findShortcut(current_index);
-                       string const x11hexname = X11hexname(index->color());
+                       string const hex32name = lyx::hex32name(index->color());
                        // display the new color
-                       docstring const str = current_index + ' ' + 
from_ascii(x11hexname);
+                       docstring const str = current_index + ' ' + 
from_ascii(hex32name);
                        dispatch(FuncRequest(LFUN_SET_COLOR, str));
                }
        }
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to