summaryrefslogtreecommitdiff
path: root/alf/alfbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alfbutton.cpp')
-rw-r--r--alf/alfbutton.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/alf/alfbutton.cpp b/alf/alfbutton.cpp
index 5f7a638..9cf7c1d 100644
--- a/alf/alfbutton.cpp
+++ b/alf/alfbutton.cpp
@@ -33,7 +33,7 @@ ALF__ButtonSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT
int xpadding = ALF_Compat_GetSystemMetricsForDpi(SM_CXEDGE,
ALF_CentipointsToPixels(GetParent(hwnd), 7200)) * 2 + 6;
int ypadding = ALF_Compat_GetSystemMetricsForDpi(SM_CYEDGE,
- ALF_CentipointsToPixels(GetParent(hwnd), 7200)) * 2 + 6;
+ ALF_CentipointsToPixels(GetParent(hwnd), 7200)) * 2 + 4;
SIZE *pSize = (SIZE*)(void*)lParam;
if (pSize->cx < r.right - r.left + xpadding) {
@@ -50,19 +50,6 @@ ALF__ButtonSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT
SelectFont(hdc, oldFont);
ReleaseDC(hwnd, hdc);
- } else if (uMsg == ALF_WM_APPLYSIZE) {
- // HACK: a themed button contains a 1px margin. An unthemed button
- // does not, so we add one.
-
- RECT *p = (RECT *)lParam;
-
- int padding = ALF_Compat_IsAppThemed() ? 0 : 1;
-
- return (LRESULT)DeferWindowPos((HDWP)wParam,
- hwnd, NULL,
- p->left, p->top + padding,
- p->right - p->left, p->bottom - p->top - 2*padding,
- SWP_NOZORDER|SWP_NOACTIVATE);
} else if (uMsg == WM_DESTROY) {
ALF_Compat_RemoveWindowSubclass(hwnd, ALF__ButtonSubclassProc, 0);
}
@@ -93,7 +80,7 @@ ALF_AddButton(HWND win, WORD id, UINT x, UINT y, const TCHAR *text)
p.y = y;
p.width = 0;
p.height = 0;
- p.flags = ALF_QUERYSIZE | ALF_MESSAGEFONT | ALF_APPLYSIZE;
+ p.flags = ALF_QUERYSIZE | ALF_MESSAGEFONT;
ALF_AddWidgetEx(win, &p);