commit 81c19502c1727a28a9505818ae70c6a32fef9a40
Author: Juergen Spitzmueller <[email protected]>
Date:   Tue Jan 19 13:27:45 2021 +0100

    Consider darkmode when inserting new branch
---
 src/Buffer.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 01469db..9b910ca 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -2943,8 +2943,10 @@ void Buffer::dispatch(FuncRequest const & func, 
DispatchResult & dr)
                                string const bcolor = branch->color();
                                if (bcolor.size() == 7 && bcolor[0] == '#')
                                        x11hexname = bcolor;
-                               else
-                                       x11hexname = 
lcolor.getX11HexName(lcolor.getFromLyXName(bcolor));
+                               else {
+                                       bool const darkmode = theApp() ? 
theApp()->isInDarkMode() : false;
+                                       x11hexname = 
lcolor.getX11HexName(lcolor.getFromLyXName(bcolor), darkmode);
+                               }
                                docstring const str = branch_name + ' ' + 
from_ascii(x11hexname);
                                lyx::dispatch(FuncRequest(LFUN_SET_COLOR, str));
                                dr.setError(false);
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to