Fix a regression due to usage of double buffer (2nd part)

Fix black text background in Find dialog status bar
Regression introduced in 5b36e09
ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/15319#issuecomment-2177773329

Close #15320
pull/15327/head^2
ozone10 2024-06-19 05:30:58 +00:00 committed by Don Ho
parent 90762bbdda
commit 965e24859f
1 changed files with 1 additions and 10 deletions

View File

@ -4987,17 +4987,8 @@ void FindReplaceDlg::drawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
}
SetTextColor(lpDrawItemStruct->hDC, fgColor);
::SetBkMode(lpDrawItemStruct->hDC, TRANSPARENT);
COLORREF bgColor;
if (NppDarkMode::isEnabled())
{
bgColor = NppDarkMode::getBackgroundColor();
}
else
{
bgColor = getCtrlBgColor(_statusBar.getHSelf());
}
::SetBkColor(lpDrawItemStruct->hDC, bgColor);
RECT rect{};
_statusBar.getClientRect(rect);