mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Consider darkmode when inserting new branch
This commit is contained in:
parent
4062cbd278
commit
81c19502c1
@ -2943,8 +2943,10 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
|
|||||||
string const bcolor = branch->color();
|
string const bcolor = branch->color();
|
||||||
if (bcolor.size() == 7 && bcolor[0] == '#')
|
if (bcolor.size() == 7 && bcolor[0] == '#')
|
||||||
x11hexname = bcolor;
|
x11hexname = bcolor;
|
||||||
else
|
else {
|
||||||
x11hexname = lcolor.getX11HexName(lcolor.getFromLyXName(bcolor));
|
bool const darkmode = theApp() ? theApp()->isInDarkMode() : false;
|
||||||
|
x11hexname = lcolor.getX11HexName(lcolor.getFromLyXName(bcolor), darkmode);
|
||||||
|
}
|
||||||
docstring const str = branch_name + ' ' + from_ascii(x11hexname);
|
docstring const str = branch_name + ' ' + from_ascii(x11hexname);
|
||||||
lyx::dispatch(FuncRequest(LFUN_SET_COLOR, str));
|
lyx::dispatch(FuncRequest(LFUN_SET_COLOR, str));
|
||||||
dr.setError(false);
|
dr.setError(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user