Fix horizontal bar showing issue while resizing document list's height

Take into account vertical scrollbar when resizing document list.

Fix #12191, close #12192
This commit is contained in:
ozone10 2022-09-18 12:59:07 +02:00 committed by Don Ho
parent 6a801cc0a4
commit d3b630841e
1 changed files with 7 additions and 1 deletions

View File

@ -388,7 +388,13 @@ void VerticalFileSwitcherListView::resizeColumns(int totalWidth)
totalColWidthDynExceptName += pathWidthDyn;
ListView_SetColumnWidth(_hSelf, ++colIndex, pathWidthDyn);
}
const auto style = ::GetWindowLongPtr(_hSelf, GWL_STYLE);
if ((style & WS_VSCROLL) == WS_VSCROLL)
{
totalColWidthDynExceptName += ::GetSystemMetrics(SM_CXVSCROLL);
}
ListView_SetColumnWidth(_hSelf, 0, totalWidth - totalColWidthDynExceptName);
}