From 965e24859fc55a19524cb53ff0328915401edfa4 Mon Sep 17 00:00:00 2001 From: ozone10 <55940305+ozone10@users.noreply.github.com> Date: Wed, 19 Jun 2024 05:30:58 +0000 Subject: [PATCH] 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 --- PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp index 749dcd895..3d3902598 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp @@ -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);