Fix URL underline always black, invisible in dark themes
Fix #8405, close #8409
This commit is contained in:
parent
fb5c30002f
commit
f657618887
@ -2489,6 +2489,7 @@ void Notepad_plus::addHotSpot(ScintillaEditView* view)
|
||||
pView->execute(SCI_INDICATORCLEARRANGE, startPos, endPos - startPos);
|
||||
if (!urlAction) return;
|
||||
|
||||
LRESULT indicFore = pView->execute(SCI_STYLEGETFORE, STYLE_DEFAULT);
|
||||
pView->execute(SCI_SETSEARCHFLAGS, SCFIND_REGEXP|SCFIND_POSIX);
|
||||
pView->execute(SCI_SETTARGETRANGE, startPos, endPos);
|
||||
int posFound = static_cast<int32_t>(pView->execute(SCI_SEARCHINTARGET, strlen(URL_REG_EXPR), reinterpret_cast<LPARAM>(URL_REG_EXPR)));
|
||||
@ -2499,7 +2500,7 @@ void Notepad_plus::addHotSpot(ScintillaEditView* view)
|
||||
int end = int(pView->execute(SCI_GETTARGETEND));
|
||||
int foundTextLen = end - start;
|
||||
pView->execute(SCI_SETINDICATORCURRENT, URL_INDIC);
|
||||
pView->execute(SCI_SETINDICATORVALUE, 0);
|
||||
pView->execute(SCI_SETINDICATORVALUE, indicFore);
|
||||
pView->execute(SCI_INDICATORFILLRANGE, start, foundTextLen);
|
||||
pView->execute(SCI_SETTARGETRANGE, posFound + foundTextLen, endPos);
|
||||
posFound = static_cast<int32_t>(pView->execute(SCI_SEARCHINTARGET, strlen(URL_REG_EXPR), reinterpret_cast<LPARAM>(URL_REG_EXPR)));
|
||||
|
@ -525,6 +525,9 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
_pDocMap->reloadMap();
|
||||
}
|
||||
|
||||
addHotSpot(_pEditView);
|
||||
addHotSpot(_pNonEditView);
|
||||
|
||||
result = TRUE;
|
||||
break;
|
||||
}
|
||||
@ -1657,9 +1660,11 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
//reset styler for change in Stylers.xml
|
||||
_mainEditView.defineDocType(_mainEditView.getCurrentBuffer()->getLangType());
|
||||
_mainEditView.performGlobalStyles();
|
||||
addHotSpot(& _mainEditView);
|
||||
|
||||
_subEditView.defineDocType(_subEditView.getCurrentBuffer()->getLangType());
|
||||
_subEditView.performGlobalStyles();
|
||||
addHotSpot(& _subEditView);
|
||||
|
||||
_findReplaceDlg.updateFinderScintilla();
|
||||
|
||||
|
@ -330,6 +330,9 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
||||
execute(SCI_INDICSETUNDER, SCE_UNIVERSAL_FOUND_STYLE_EXT5, true);
|
||||
|
||||
execute(SCI_INDICSETHOVERSTYLE, URL_INDIC, INDIC_FULLBOX);
|
||||
execute(SCI_INDICSETALPHA, URL_INDIC, 70);
|
||||
execute(SCI_INDICSETFLAGS, URL_INDIC, SC_INDICFLAG_VALUEFORE);
|
||||
|
||||
|
||||
if ((NppParameters::getInstance()).getNppGUI()._writeTechnologyEngine == directWriteTechnology)
|
||||
execute(SCI_SETTECHNOLOGY, SC_TECHNOLOGY_DIRECTWRITE);
|
||||
|
Loading…
Reference in New Issue
Block a user