diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index cd2a42877..2c2747f8f 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -7554,6 +7554,14 @@ void Notepad_plus::refreshDarkMode() ::SendMessage(_pFileSwitcherPanel->getHSelf(), NPPM_INTERNAL_REFRESHDARKMODE, 0, 0); } + if (_pClipboardHistoryPanel) + { + ::SendMessage(_pClipboardHistoryPanel->getHSelf(), NPPM_INTERNAL_REFRESHDARKMODE, 0, 0); + } + + ::SendMessage(_subEditView.getHSelf(), NPPM_INTERNAL_REFRESHDARKMODE, 0, 0); + ::SendMessage(_mainEditView.getHSelf(), NPPM_INTERNAL_REFRESHDARKMODE, 0, 0); + ::SendMessage(_mainDocTab.getHSelf(), NPPM_INTERNAL_REFRESHDARKMODE, 0, 0); ::SendMessage(_subDocTab.getHSelf(), NPPM_INTERNAL_REFRESHDARKMODE, 0, 0); diff --git a/PowerEditor/src/NppDarkMode.cpp b/PowerEditor/src/NppDarkMode.cpp index 6bb0a516d..81b08ffc9 100644 --- a/PowerEditor/src/NppDarkMode.cpp +++ b/PowerEditor/src/NppDarkMode.cpp @@ -1052,6 +1052,16 @@ namespace NppDarkMode NppDarkMode::setTitleBarThemeColor(hwnd, useDark); } + void setDarkExplorerTheme(HWND hwnd) + { + SetWindowTheme(hwnd, NppDarkMode::isEnabled() ? L"DarkMode_Explorer" : nullptr, nullptr); + } + + void setDarkScrollBar(HWND hwnd) + { + NppDarkMode::setDarkExplorerTheme(hwnd); + } + void setDarkTooltips(HWND hwnd, ToolTipsType type) { UINT msg = 0; @@ -1076,14 +1086,14 @@ namespace NppDarkMode if (msg == 0) { - SetWindowTheme(hwnd, NppDarkMode::isEnabled() ? L"DarkMode_Explorer" : nullptr, nullptr); + NppDarkMode::setDarkExplorerTheme(hwnd); } else { auto hTips = reinterpret_cast(::SendMessage(hwnd, msg, 0, 0)); if (hTips != nullptr) { - SetWindowTheme(hTips, NppDarkMode::isEnabled() ? L"DarkMode_Explorer" : nullptr, nullptr); + NppDarkMode::setDarkExplorerTheme(hTips); } } } diff --git a/PowerEditor/src/NppDarkMode.h b/PowerEditor/src/NppDarkMode.h index 6069d13c2..d53259e11 100644 --- a/PowerEditor/src/NppDarkMode.h +++ b/PowerEditor/src/NppDarkMode.h @@ -85,6 +85,8 @@ namespace NppDarkMode void autoThemeChildControls(HWND hwndParent); void setDarkTitleBar(HWND hwnd); + void setDarkExplorerTheme(HWND hwnd); + void setDarkScrollBar(HWND hwnd); void setDarkTooltips(HWND hwnd, ToolTipsType type); void setDarkLineAbovePanelToolbar(HWND hwnd); diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp index 3f00fdd81..6db1b1f63 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp @@ -881,6 +881,13 @@ INT_PTR CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM NppDarkMode::setDarkTooltips(_shiftTrickUpTip, NppDarkMode::ToolTipsType::tooltip); NppDarkMode::setDarkTooltips(_2ButtonsTip, NppDarkMode::ToolTipsType::tooltip); NppDarkMode::setDarkTooltips(_filterTip, NppDarkMode::ToolTipsType::tooltip); + + HWND finder = getHFindResults(); + if (finder) + { + NppDarkMode::setDarkScrollBar(finder); + } + NppDarkMode::autoThemeChildControls(_hSelf); return TRUE; } diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index 4b17d6703..c9cdf4e1e 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -187,7 +187,7 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere) } Window::init(hInst, hPere); - _hSelf = ::CreateWindowEx( + _hSelf = ::CreateWindowEx( 0,\ TEXT("Scintilla"),\ TEXT("Notepad++"),\ @@ -203,10 +203,12 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere) throw std::runtime_error("ScintillaEditView::init : CreateWindowEx() function return null"); } + NppDarkMode::setDarkScrollBar(_hSelf); + _pScintillaFunc = (SCINTILLA_FUNC)::SendMessage(_hSelf, SCI_GETDIRECTFUNCTION, 0, 0); _pScintillaPtr = (SCINTILLA_PTR)::SendMessage(_hSelf, SCI_GETDIRECTPOINTER, 0, 0); - _userDefineDlg.init(_hInst, _hParent, this); + _userDefineDlg.init(_hInst, _hParent, this); if (!_pScintillaFunc) { @@ -218,10 +220,10 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere) throw std::runtime_error("ScintillaEditView::init : SCI_GETDIRECTPOINTER message failed"); } - execute(SCI_SETMARGINMASKN, _SC_MARGE_FOLDER, SC_MASK_FOLDERS); - showMargin(_SC_MARGE_FOLDER, true); + execute(SCI_SETMARGINMASKN, _SC_MARGE_FOLDER, SC_MASK_FOLDERS); + showMargin(_SC_MARGE_FOLDER, true); - execute(SCI_SETMARGINMASKN, _SC_MARGE_SYBOLE, (1< 0)?SB_LINERIGHT:SB_LINELEFT, 0); diff --git a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp index 10f60fec6..cec13a759 100644 --- a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp +++ b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp @@ -188,13 +188,20 @@ void ClipboardHistoryPanel::drawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) INT_PTR CALLBACK ClipboardHistoryPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { - switch (message) - { - case WM_INITDIALOG : - { + switch (message) + { + case WM_INITDIALOG: + { _hwndNextCbViewer = ::SetClipboardViewer(_hSelf); - return TRUE; - } + NppDarkMode::setDarkScrollBar(::GetDlgItem(_hSelf, IDC_LIST_CLIPBOARD)); + return TRUE; + } + + case NPPM_INTERNAL_REFRESHDARKMODE: + { + NppDarkMode::setDarkScrollBar(GetDlgItem(_hSelf, IDC_LIST_CLIPBOARD)); + return TRUE; + } case WM_CHANGECBCHAIN: if (_hwndNextCbViewer == reinterpret_cast(wParam))