mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 05:45:00 +02:00
Fix scrollbar sometimes not drawn in listbox in dark mode
Fix #16674, close #16676
This commit is contained in:
parent
a8ff8bb78e
commit
61084f1c93
@ -2137,7 +2137,6 @@ namespace NppDarkMode
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
|
||||||
case WM_NCCALCSIZE:
|
case WM_NCCALCSIZE:
|
||||||
{
|
{
|
||||||
@ -2149,22 +2148,8 @@ namespace NppDarkMode
|
|||||||
auto lpRect = reinterpret_cast<LPRECT>(lParam);
|
auto lpRect = reinterpret_cast<LPRECT>(lParam);
|
||||||
::InflateRect(lpRect, -(pBorderMetricsData->_xEdge), -(pBorderMetricsData->_yEdge));
|
::InflateRect(lpRect, -(pBorderMetricsData->_xEdge), -(pBorderMetricsData->_yEdge));
|
||||||
|
|
||||||
auto style = ::GetWindowLongPtr(hWnd, GWL_STYLE);
|
break;
|
||||||
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;
|
|
||||||
|
|
||||||
case WM_DPICHANGED:
|
case WM_DPICHANGED:
|
||||||
case WM_DPICHANGED_AFTERPARENT:
|
case WM_DPICHANGED_AFTERPARENT:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user