Fix regression: disable Explorer Theme for TreeView
Ref: #10061 Close #10062
This commit is contained in:
parent
3347044595
commit
1da707128a
|
@ -1104,9 +1104,13 @@ namespace NppDarkMode
|
|||
::SendMessage(hwnd, TB_SETCOLORSCHEME, 0, reinterpret_cast<LPARAM>(&scheme));
|
||||
}
|
||||
|
||||
void setExplorerTheme(HWND hwnd, bool doEnable)
|
||||
void setExplorerTheme(HWND hwnd, bool doEnable, bool isTreeView)
|
||||
{
|
||||
if (doEnable)
|
||||
if (isTreeView)
|
||||
{
|
||||
SetWindowTheme(hwnd, nullptr, nullptr);
|
||||
}
|
||||
else if (doEnable)
|
||||
{
|
||||
NppDarkMode::allowDarkModeForWindow(hwnd, NppDarkMode::isEnabled() && NppDarkMode::isExperimentalEnabled());
|
||||
SetWindowTheme(hwnd, L"Explorer", nullptr);
|
||||
|
|
|
@ -87,5 +87,5 @@ namespace NppDarkMode
|
|||
void setDarkTooltips(HWND hwnd, ToolTipsType type);
|
||||
void setDarkLineAbovePanelToolbar(HWND hwnd);
|
||||
|
||||
void setExplorerTheme(HWND hwnd, bool doEnable);
|
||||
void setExplorerTheme(HWND hwnd, bool doEnable, bool isTreeView = false);
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ INT_PTR CALLBACK FileBrowser::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
|||
NppDarkMode::setDarkTooltips(_hToolbarMenu, NppDarkMode::ToolTipsType::toolbar);
|
||||
NppDarkMode::setDarkLineAbovePanelToolbar(_hToolbarMenu);
|
||||
|
||||
NppDarkMode::setExplorerTheme(_treeView.getHSelf(), true);
|
||||
NppDarkMode::setExplorerTheme(_treeView.getHSelf(), true, true);
|
||||
NppDarkMode::setDarkTooltips(_treeView.getHSelf(), NppDarkMode::ToolTipsType::treeview);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -896,7 +896,7 @@ INT_PTR CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPA
|
|||
NppDarkMode::setDarkTooltips(_hToolbarMenu, NppDarkMode::ToolTipsType::toolbar);
|
||||
NppDarkMode::setDarkLineAbovePanelToolbar(_hToolbarMenu);
|
||||
|
||||
NppDarkMode::setExplorerTheme(_treeView.getHSelf(), true);
|
||||
NppDarkMode::setExplorerTheme(_treeView.getHSelf(), true, true);
|
||||
NppDarkMode::setDarkTooltips(_treeView.getHSelf(), NppDarkMode::ToolTipsType::treeview);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ INT_PTR CALLBACK ProjectPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM l
|
|||
{
|
||||
NppDarkMode::setDarkLineAbovePanelToolbar(_hToolbarMenu);
|
||||
|
||||
NppDarkMode::setExplorerTheme(_treeView.getHSelf(), true);
|
||||
NppDarkMode::setExplorerTheme(_treeView.getHSelf(), true, true);
|
||||
NppDarkMode::setDarkTooltips(_treeView.getHSelf(), NppDarkMode::ToolTipsType::treeview);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ void TreeView::init(HINSTANCE hInst, HWND parent, int treeViewID)
|
|||
_hInst,
|
||||
nullptr);
|
||||
|
||||
NppDarkMode::setExplorerTheme(_hSelf, true);
|
||||
NppDarkMode::setExplorerTheme(_hSelf, true, true);
|
||||
NppDarkMode::setDarkTooltips(_hSelf, NppDarkMode::ToolTipsType::treeview);
|
||||
|
||||
int itemHeight = NppParameters::getInstance()._dpiManager.scaleY(CY_ITEMHEIGHT);
|
||||
|
|
Loading…
Reference in New Issue