aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index 17ae373..cdb3dc7 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -141,15 +141,16 @@ void EpisodeListView::Redraw()
RDW_ERASE|RDW_FRAME|RDW_INVALIDATE|RDW_ALLCHILDREN);
}
-void EpisodeListView::ResizeColumns(RECT& rcParent)
+void EpisodeListView::ResizeColumns()
{
- ListView_SetColumnWidth(hWnd, ELVSIEPISODE, LVSCW_AUTOSIZE);
+ RECT rc;
+ require(GetClientRect(hWnd, &rc));
+ ListView_SetColumnWidth(hWnd, ELVSIEPISODE, LVSCW_AUTOSIZE);
int cxColumn = ListView_GetColumnWidth(hWnd, ELVSIEPISODE)+4;
ListView_SetColumnWidth(hWnd, ELVSIEPISODE, cxColumn);
-
cxColumn += ListView_GetColumnWidth(hWnd, ELVSIRATING);
- ListView_SetColumnWidth(hWnd, ELVSITITLE, rcParent.right-cxColumn-Metric<SM_CXVSCROLL>-4);
+ ListView_SetColumnWidth(hWnd, ELVSITITLE, rc.right-cxColumn);
}
/* Select previously focused episode. */