Make Change History margin colour configurable
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/12165#issuecomment-1250899679
This commit is contained in:
parent
ead6fb6b8f
commit
6a801cc0a4
|
@ -3741,7 +3741,6 @@ void Notepad_plus::command(int id)
|
||||||
|
|
||||||
case IDM_VIEW_LINENUMBER:
|
case IDM_VIEW_LINENUMBER:
|
||||||
case IDM_VIEW_SYMBOLMARGIN:
|
case IDM_VIEW_SYMBOLMARGIN:
|
||||||
case IDM_VIEW_DOCCHANGEMARGIN:
|
|
||||||
{
|
{
|
||||||
int margin;
|
int margin;
|
||||||
if (id == IDM_VIEW_LINENUMBER)
|
if (id == IDM_VIEW_LINENUMBER)
|
||||||
|
|
|
@ -3632,6 +3632,7 @@ bool NppParameters::feedStylerArray(TiXmlNode *node)
|
||||||
_widgetStyleArray.addStyler(styleID, childNode);
|
_widgetStyleArray.addStyler(styleID, childNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const Style* pStyle = _widgetStyleArray.findByName(TEXT("EOL custom color"));
|
const Style* pStyle = _widgetStyleArray.findByName(TEXT("EOL custom color"));
|
||||||
if (!pStyle)
|
if (!pStyle)
|
||||||
{
|
{
|
||||||
|
@ -3643,6 +3644,17 @@ bool NppParameters::feedStylerArray(TiXmlNode *node)
|
||||||
_widgetStyleArray.addStyler(0, eolColorkNode);
|
_widgetStyleArray.addStyler(0, eolColorkNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pStyle = _widgetStyleArray.findByName(TEXT("Change History margin"));
|
||||||
|
if (!pStyle)
|
||||||
|
{
|
||||||
|
TiXmlNode* changeHistoryNode = globalStyleRoot->InsertEndChild(TiXmlElement(TEXT("WidgetStyle")));
|
||||||
|
changeHistoryNode->ToElement()->SetAttribute(TEXT("name"), TEXT("Change History margin"));
|
||||||
|
changeHistoryNode->ToElement()->SetAttribute(TEXT("styleID"), TEXT("0"));
|
||||||
|
changeHistoryNode->ToElement()->SetAttribute(TEXT("bgColor"), TEXT("E0E0E0"));
|
||||||
|
|
||||||
|
_widgetStyleArray.addStyler(0, changeHistoryNode);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2741,6 +2741,15 @@ void ScintillaEditView::performGlobalStyles()
|
||||||
execute(SCI_SETMARGINTYPEN, _SC_MARGE_SYMBOL, SC_MARGIN_COLOUR);
|
execute(SCI_SETMARGINTYPEN, _SC_MARGE_SYMBOL, SC_MARGIN_COLOUR);
|
||||||
execute(SCI_SETMARGINBACKN, _SC_MARGE_SYMBOL, bookmarkMarginColor);
|
execute(SCI_SETMARGINBACKN, _SC_MARGE_SYMBOL, bookmarkMarginColor);
|
||||||
|
|
||||||
|
COLORREF changeHistoryMarginColor = veryLiteGrey;
|
||||||
|
pStyle = stylers.findByName(TEXT("Change History margin"));
|
||||||
|
if (pStyle)
|
||||||
|
{
|
||||||
|
changeHistoryMarginColor = pStyle->_bgColor;
|
||||||
|
}
|
||||||
|
execute(SCI_SETMARGINTYPEN, _SC_MARGE_CHANGEHISTORY, SC_MARGIN_COLOUR);
|
||||||
|
execute(SCI_SETMARGINBACKN, _SC_MARGE_CHANGEHISTORY, changeHistoryMarginColor);
|
||||||
|
|
||||||
COLORREF urlHoveredFG = grey;
|
COLORREF urlHoveredFG = grey;
|
||||||
pStyle = stylers.findByName(TEXT("URL hovered"));
|
pStyle = stylers.findByName(TEXT("URL hovered"));
|
||||||
if (pStyle)
|
if (pStyle)
|
||||||
|
|
|
@ -302,7 +302,7 @@
|
||||||
#define IDM_VIEW_HIDELINES (IDM_VIEW + 42)
|
#define IDM_VIEW_HIDELINES (IDM_VIEW + 42)
|
||||||
#define IDM_VIEW_DRAWTABBAR_VERTICAL (IDM_VIEW + 43)
|
#define IDM_VIEW_DRAWTABBAR_VERTICAL (IDM_VIEW + 43)
|
||||||
#define IDM_VIEW_DRAWTABBAR_MULTILINE (IDM_VIEW + 44)
|
#define IDM_VIEW_DRAWTABBAR_MULTILINE (IDM_VIEW + 44)
|
||||||
#define IDM_VIEW_DOCCHANGEMARGIN (IDM_VIEW + 45)
|
//#define IDM_VIEW_DOCCHANGEMARGIN (IDM_VIEW + 45)
|
||||||
#define IDM_VIEW_LWDEF (IDM_VIEW + 46)
|
#define IDM_VIEW_LWDEF (IDM_VIEW + 46)
|
||||||
#define IDM_VIEW_LWALIGN (IDM_VIEW + 47)
|
#define IDM_VIEW_LWALIGN (IDM_VIEW + 47)
|
||||||
#define IDM_VIEW_LWINDENT (IDM_VIEW + 48)
|
#define IDM_VIEW_LWINDENT (IDM_VIEW + 48)
|
||||||
|
|
|
@ -1413,6 +1413,7 @@
|
||||||
<WidgetStyle name="Edge colour" styleID="0" fgColor="80FFFF" />
|
<WidgetStyle name="Edge colour" styleID="0" fgColor="80FFFF" />
|
||||||
<WidgetStyle name="Line number margin" styleID="33" fgColor="808080" bgColor="E4E4E4" fontName="" fontStyle="0" fontSize="" />
|
<WidgetStyle name="Line number margin" styleID="33" fgColor="808080" bgColor="E4E4E4" fontName="" fontStyle="0" fontSize="" />
|
||||||
<WidgetStyle name="Bookmark margin" styleID="0" bgColor="E0E0E0" />
|
<WidgetStyle name="Bookmark margin" styleID="0" bgColor="E0E0E0" />
|
||||||
|
<WidgetStyle name="Change History margin" styleID="0" bgColor="E0E0E0" />
|
||||||
<WidgetStyle name="Fold" styleID="0" fgColor="808080" bgColor="F3F3F3" />
|
<WidgetStyle name="Fold" styleID="0" fgColor="808080" bgColor="F3F3F3" />
|
||||||
<WidgetStyle name="Fold active" styleID="0" fgColor="FF0000" />
|
<WidgetStyle name="Fold active" styleID="0" fgColor="FF0000" />
|
||||||
<WidgetStyle name="Fold margin" styleID="0" fgColor="FFFFFF" bgColor="E9E9E9" />
|
<WidgetStyle name="Fold margin" styleID="0" fgColor="FFFFFF" bgColor="E9E9E9" />
|
||||||
|
|
Loading…
Reference in New Issue