summaryrefslogtreecommitdiff
path: root/alf/alf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alf.cpp')
-rw-r--r--alf/alf.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/alf/alf.cpp b/alf/alf.cpp
index 2f3af7c..e71e3a1 100644
--- a/alf/alf.cpp
+++ b/alf/alf.cpp
@@ -414,11 +414,16 @@ ALF_DefWindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
if (msg == WM_DPICHANGED) {
ALF_UpdateFonts(hwnd);
- ALF_RecalculateLayout(hwnd);
+ ALF_CalculateSizes(priv);
RECT *r = (RECT*)lparam;
SetWindowPos(hwnd, NULL, r->left, r->top, r->right-r->left, r->bottom-r->top, SWP_NOACTIVATE|SWP_NOZORDER);
}
+ if (msg == WM_THEMECHANGED || msg == WM_SETTINGCHANGE) {
+ ALF_UpdateFonts(hwnd);
+ ALF_RecalculateLayout(hwnd);
+ }
+
if (msg == DM_GETDEFID) {
if (priv->defid == (WORD)-1) {
return 0;
@@ -606,11 +611,17 @@ ALF_CentipointsToPixels(HWND win, int cptValue)
}
void
-ALF_ResizeWindow(HWND win, UINT cptWidth, UINT cptHeight)
+ALF_ResizeWindow(HWND win, int cptWidth, int cptHeight)
{
int pxwidth = ALF_CentipointsToPixels(win, cptWidth);
int pxheight = ALF_CentipointsToPixels(win, cptHeight);
+ ALF_ResizeWindowPx(win, pxwidth, pxheight);
+}
+
+void
+ALF_ResizeWindowPx(HWND win, int pxwidth, int pxheight)
+{
MINMAXINFO tmp = {
{ 0, 0 },
{ pxwidth, pxheight },