Skip to content

Commit

Permalink
Merge pull request #453 from lifenjoiner/VScroll
Browse files Browse the repository at this point in the history
fix item width for AutoSizeAllColumns excluding the vertical scroll bar
  • Loading branch information
stefankueng authored Feb 13, 2024
2 parents 939fb0b + 45bee9d commit c94a0be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SearchDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4525,7 +4525,8 @@ void CSearchDlg::AutoSizeAllColumns()
{
RECT rc{};
ListView_GetItemRect(hListControl, 0, &rc, LVIR_BOUNDS);
auto itemWidth = rc.right - rc.left;
int cxVScroll = GetSystemMetrics(SM_CXVSCROLL);
auto itemWidth = rc.right - rc.left - cxVScroll;
if (nItemCount > 0)
{
GetClientRect(hListControl, &rc);
Expand Down

0 comments on commit c94a0be

Please sign in to comment.