Fix scrollbar sometimes not drawn in listbox in dark mode

Fix #16674, close #16676
This commit is contained in:
ozone10 2025-06-12 19:45:54 +02:00 committed by Don Ho
parent a8ff8bb78e
commit 61084f1c93

View File

@ -2137,7 +2137,6 @@ namespace NppDarkMode
return 0;
}
break;
case WM_NCCALCSIZE:
{
@ -2149,22 +2148,8 @@ namespace NppDarkMode
auto lpRect = reinterpret_cast<LPRECT>(lParam);
::InflateRect(lpRect, -(pBorderMetricsData->_xEdge), -(pBorderMetricsData->_yEdge));
auto style = ::GetWindowLongPtr(hWnd, GWL_STYLE);
bool hasVerScrollbar = (style & WS_VSCROLL) == WS_VSCROLL;
if (hasVerScrollbar)
{
lpRect->right -= pBorderMetricsData->_xScroll;
}
bool hasHorScrollbar = (style & WS_HSCROLL) == WS_HSCROLL;
if (hasHorScrollbar)
{
lpRect->bottom -= pBorderMetricsData->_yScroll;
}
return 0;
break;
}
break;
case WM_DPICHANGED:
case WM_DPICHANGED_AFTERPARENT: