Make URL hover foreground colour work again

This commit is contained in:
Don HO 2020-06-03 01:57:12 +02:00
parent f229524883
commit fa51c2af6e
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
4 changed files with 12 additions and 3 deletions

View File

@ -2455,8 +2455,8 @@ void Notepad_plus::addHotSpot(ScintillaEditView* view)
ScintillaEditView* pView = view ? view : _pEditView;
int urlAction = (NppParameters::getInstance()).getNppGUI()._styleURL;
LPARAM Style = (urlAction == 2) ? INDIC_PLAIN : INDIC_HIDDEN;
pView->execute(SCI_INDICSETSTYLE, URL_INDIC, Style);
LPARAM indicStyle = (urlAction == 2) ? INDIC_PLAIN : INDIC_HIDDEN;
pView->execute(SCI_INDICSETSTYLE, URL_INDIC, indicStyle);
pView->execute(SCI_INDICSETHOVERSTYLE, URL_INDIC, INDIC_FULLBOX);
int startPos = 0;

View File

@ -62,7 +62,6 @@
#define TOOLBAR 0x02
#define URL_REG_EXPR "[A-Za-z]+://[A-Za-z0-9_\\-\\+~.:?&@=/%#,;\\{\\}\\(\\)\\[\\]\\|\\*\\!\\\\]+"
#define URL_INDIC 8
enum FileTransferMode {
TransferClone = 0x01,

View File

@ -2609,6 +2609,15 @@ void ScintillaEditView::performGlobalStyles()
execute(SCI_SETFOLDMARGINCOLOUR, true, foldMarginColor);
execute(SCI_SETFOLDMARGINHICOLOUR, true, foldMarginHiColor);
COLORREF urlHoveredFG = grey;
i = stylers.getStylerIndexByName(TEXT("URL hovered"));
if (i != -1)
{
Style & style = stylers.getStyler(i);
urlHoveredFG = style._fgColor;
}
execute(SCI_INDICSETHOVERFORE, URL_INDIC, urlHoveredFG);
COLORREF foldfgColor = white, foldbgColor = grey, activeFoldFgColor = red;
getFoldColor(foldfgColor, foldbgColor, activeFoldFgColor);

View File

@ -187,6 +187,7 @@ struct LanguageName {
int lexerID;
};
#define URL_INDIC 8
class ISorter;
class ScintillaEditView : public Window