aboutsummaryrefslogtreecommitdiff
path: root/c/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/main.cpp')
-rw-r--r--c/main.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/c/main.cpp b/c/main.cpp
index c04890d..421e0ca 100644
--- a/c/main.cpp
+++ b/c/main.cpp
@@ -518,11 +518,16 @@ void UpdateLayout()
SendMessage(g_pDlv->hWnd, WM_SETREDRAW, FALSE, 0);
SendMessage(g_pElv->hWnd, WM_SETREDRAW, FALSE, 0);
+ /* If a modern theme is used, list view borders should be
+ * hidden. This variable governs that. (See how it is used in
+ * the arguments to SetWindowRect below.) */
+ const long x = IsThemeActive();
+
const long cyDlv = rrStatus.top-g_pDlv->Height();
- require(SetWindowRect(g_pDlv->hWnd, 0, cyDlv, rc.right, rrStatus.top));
- require(SetWindowRect(g_pElv->hWnd, 0, 0, rc.right, cyDlv+IsThemeActive()));
- g_pDlv->ResizeColumns(rc);
- g_pElv->ResizeColumns(rc);
+ require(SetWindowRect(g_pDlv->hWnd, -x, cyDlv, rc.right+x*2, rrStatus.top+x));
+ require(SetWindowRect(g_pElv->hWnd, -x, -x*2, rc.right+x*2, cyDlv+x));
+ g_pDlv->ResizeColumns();
+ g_pElv->ResizeColumns();
SendMessage(g_pElv->hWnd, WM_SETREDRAW, TRUE, 0);
SendMessage(g_pDlv->hWnd, WM_SETREDRAW, TRUE, 0);