aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-20 21:27:30 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-20 21:27:30 +0200
commit561ee240477e348efcd3670a5481ccb538d6724b (patch)
tree0bfee883963a390c657e627a2184068826168d6f /c/episodelistview.cpp
parent3f842c733568aa9068aa83fad52540eb98f334b1 (diff)
downloadEpisodeBrowser-561ee240477e348efcd3670a5481ccb538d6724b.tar.gz
Simplify UpdateLayout.
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp12
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()
{