aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index bc01ce9..4b93587 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -141,16 +141,13 @@ void EpisodeListView::Redraw()
RDW_ERASE|RDW_FRAME|RDW_INVALIDATE|RDW_ALLCHILDREN);
}
-void EpisodeListView::ResizeColumns()
+void EpisodeListView::ResizeColumns(int w)
{
- RECT rc;
- require(GetClientRect(hWnd, &rc));
-
ListView_SetColumnWidth(hWnd, ELVSIEPISODE, LVSCW_AUTOSIZE);
- int cxColumn = ListView_GetColumnWidth(hWnd, ELVSIEPISODE)+4;
+ int cxColumn = ListView_GetColumnWidth(hWnd, ELVSIEPISODE)+Dpi(4);
ListView_SetColumnWidth(hWnd, ELVSIEPISODE, cxColumn);
cxColumn += ListView_GetColumnWidth(hWnd, ELVSIRATING);
- ListView_SetColumnWidth(hWnd, ELVSITITLE, rc.right-cxColumn);
+ ListView_SetColumnWidth(hWnd, ELVSITITLE, w-cxColumn-Metric<SM_CXVSCROLL>-Dpi(4));
}
/* Select previously focused episode. */
@@ -406,8 +403,10 @@ void EpisodeListView::Update()
if (iItemTopNew != -1)
SetTop(iItemTopNew);
+ /* Show number of displayed items in status bar. */
_stprintf_s(tszDisp, sizeof(tszDisp), TEXT("%d"), iItem);
SendMessage(g_hWndStatus, SB_SETTEXT, MAKEWPARAM(1,0), (LPARAM)tszDisp);
+
SendMessage(hWnd, WM_SETREDRAW, TRUE, 0);
}