Fix Change history margin in black color issue

Use Line number margin style color for Change history margin, if not defined in 'theme.xml'.

Fix #12764, fix #13593, close #13594
pull/13616/head
ozone10 2023-04-25 17:57:46 +02:00 committed by Don Ho
parent 6b194453b8
commit 2d5c241e2b
1 changed files with 13 additions and 3 deletions

View File

@ -2808,12 +2808,22 @@ void ScintillaEditView::performGlobalStyles()
execute(SCI_SETMARGINTYPEN, _SC_MARGE_SYMBOL, SC_MARGIN_COLOUR);
execute(SCI_SETMARGINBACKN, _SC_MARGE_SYMBOL, bookmarkMarginColor);
COLORREF changeHistoryMarginColor = veryLiteGrey;
pStyle = stylers.findByName(TEXT("Change History margin"));
if (pStyle)
if (!pStyle)
{
execute(SCI_SETMARGINTYPEN, _SC_MARGE_CHANGEHISTORY, SC_MARGIN_COLOUR);
execute(SCI_SETMARGINBACKN, _SC_MARGE_CHANGEHISTORY, pStyle->_bgColor);
pStyle = stylers.findByName(TEXT("Line number margin"));
if (pStyle)
{
changeHistoryMarginColor = pStyle->_bgColor;
}
}
else
{
changeHistoryMarginColor = pStyle->_bgColor;
}
execute(SCI_SETMARGINTYPEN, _SC_MARGE_CHANGEHISTORY, SC_MARGIN_COLOUR);
execute(SCI_SETMARGINBACKN, _SC_MARGE_CHANGEHISTORY, changeHistoryMarginColor);
COLORREF urlHoveredFG = grey;
pStyle = stylers.findByName(TEXT("URL hovered"));