diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-03 16:55:03 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-03 16:55:03 +0200 |
commit | df88618efb32274e7b21493c48483d4761d2f9a3 (patch) | |
tree | 2c86ca67efc96e27b6fdd32a95e3bcb7ab1c90d0 /c/layout.cpp | |
parent | 23dc657f0af27bdac887f8d18208d544cc9f010e (diff) | |
download | EpisodeBrowser-df88618efb32274e7b21493c48483d4761d2f9a3.tar.gz |
Load uxtheme dynamically.
In case it is not supported. If I am not mistaken, SWI-Prolog supports
Windows 2000, so there is no reason why Episode Browser shouldn't.
Diffstat (limited to 'c/layout.cpp')
-rw-r--r-- | c/layout.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/c/layout.cpp b/c/layout.cpp index de1f1f7..4da7cd8 100644 --- a/c/layout.cpp +++ b/c/layout.cpp @@ -1,5 +1,4 @@ #include <windows.h> -#include <uxtheme.h> #include "common.h" #include "episodelistview.h" @@ -23,7 +22,7 @@ void UpdateLayout(int w, int h) SendMessage(g_hWnd, WM_SETREDRAW, FALSE, 0); /* Resize list views. */ - const long pad = IsThemeActive()? Dpi(6): 0; /* Add padding in modern themes. */ + const long pad = EBIsThemeActive()? Dpi(6): 0; /* Add padding in modern themes. */ const long cyDlv = rrStatus.top-g_dlv->Height()-pad; require(SetWindowRect(g_dlv->hWnd, pad, cyDlv, rc.right-pad, rrStatus.top-pad)); require(SetWindowRect(g_elv->hWnd, pad, pad, rc.right-pad, cyDlv-pad)); @@ -44,8 +43,8 @@ bool Dragger::InDragArea(const int x, const int y) RECT rrDlv; require(GetRelativeRect(g_dlv->hWnd, &rrDlv)); - const int pad = IsThemeActive()? Dpi(6): 0; - const int extra = IsThemeActive()? 0: Dpi(2); + const int pad = EBIsThemeActive()? Dpi(6): 0; + const int extra = EBIsThemeActive()? 0: Dpi(2); if (x < rrDlv.left || x > rrDlv.right) return false; if (y < rrDlv.top-pad*2-extra*3 || y > rrDlv.top+extra) return false; return true; |