diff options
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r-- | c/episodelistview.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index 676f375..6f12a0f 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -141,6 +141,18 @@ void EpisodeListView::Redraw() RDW_ERASE|RDW_FRAME|RDW_INVALIDATE|RDW_ALLCHILDREN); } +void EpisodeListView::ResizeColumns(RECT& rcParent) +{ + extern int g_cxVScroll; + 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-g_cxVScroll-4); +} + /* Select previously focused episode. */ void EpisodeListView::RestoreFocus() { |