diff options
Diffstat (limited to 'c/datalistview.cpp')
-rw-r--r-- | c/datalistview.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/c/datalistview.cpp b/c/datalistview.cpp index 1ceeb3b..82b62e6 100644 --- a/c/datalistview.cpp +++ b/c/datalistview.cpp @@ -29,15 +29,12 @@ DataListView::DataListView(const HWND hWndParent) ListView_InsertColumn(hWnd, DLVSIVALUE, &lvc); } -void DataListView::ResizeColumns() +void DataListView::ResizeColumns(int w) { - RECT rc; - require(GetClientRect(hWnd, &rc)); - ListView_SetColumnWidth(hWnd, DLVSIKEY, LVSCW_AUTOSIZE); - const int cxColumn = ListView_GetColumnWidth(hWnd, 0)+4; + const int cxColumn = ListView_GetColumnWidth(hWnd, DLVSIKEY)+Dpi(4); ListView_SetColumnWidth(hWnd, DLVSIKEY, cxColumn); - ListView_SetColumnWidth(hWnd, DLVSIVALUE, rc.right-cxColumn); + ListView_SetColumnWidth(hWnd, DLVSIVALUE, w-cxColumn-Metric<SM_CXVSCROLL>-Dpi(4)); } void DataListView::ShowEpisode(const int iEpisode) |