aboutsummaryrefslogtreecommitdiff
path: root/c/listview.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-03-31 00:24:52 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-03-31 00:24:52 +0200
commit4ec130efd5131f7cf2c48a1625291efdd522e048 (patch)
tree62c1b6c2d8762a448653f95726e7d6d4df1d176a /c/listview.c
parentf7e97646dd9a20f0e4db266c94c79529d8edf169 (diff)
downloadEpisodeBrowser-4ec130efd5131f7cf2c48a1625291efdd522e048.tar.gz
Set minimum window height.
Diffstat (limited to 'c/listview.c')
-rw-r--r--c/listview.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/c/listview.c b/c/listview.c
index 82c6459..a528e44 100644
--- a/c/listview.c
+++ b/c/listview.c
@@ -69,6 +69,15 @@ LvProc(HWND hLv, UINT uMsg, WPARAM wParam, LPARAM lParam)
return CallWindowProc(LvPrevProc, hLv, uMsg, wParam, lParam);
}
+/* Naively calculate height of list view. */
+int
+LvHeight(HWND hLv)
+{
+ int iCount;
+ iCount = ListView_GetItemCount(hLv);
+ return iCount? 27+iCount*19: 0;
+}
+
/* Enable/disable non-classic list view theme. */
void
LvSetTheme(HWND hLv, int bUseTheme)