diff options
Diffstat (limited to 'alf/alfbutton.cpp')
| -rw-r--r-- | alf/alfbutton.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alf/alfbutton.cpp b/alf/alfbutton.cpp index c46693e..2df9fc9 100644 --- a/alf/alfbutton.cpp +++ b/alf/alfbutton.cpp @@ -22,7 +22,7 @@ ALF__ButtonSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT if ((style & BS_MULTILINE) == 0) format |= DT_SINGLELINE; - RECT r = { 0, 0, 100, 100 }; + RECT r = { 0, 0, 0x7FFFFFFF, 100 }; int textlen = GetWindowTextLength(hwnd); TCHAR *textbuf = (TCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY|HEAP_GENERATE_EXCEPTIONS, (textlen + 1)*sizeof(TCHAR)); @@ -33,9 +33,9 @@ ALF__ButtonSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT HeapFree(GetProcessHeap(), 0, textbuf); int xpadding = app->compatFn->GetSystemMetricsForDpi(SM_CXEDGE, - ALF_CentipointsToPixels(GetParent(hwnd), 7200)) * 3; + ALF_CentipointsToPixels(GetParent(hwnd), 7200)) * 2 + 6; int ypadding = app->compatFn->GetSystemMetricsForDpi(SM_CYEDGE, - ALF_CentipointsToPixels(GetParent(hwnd), 7200)) * 3; + ALF_CentipointsToPixels(GetParent(hwnd), 7200)) * 2 + 6; SIZE *pSize = (SIZE*)(void*)lParam; if (pSize->cx < r.right - r.left + xpadding) { @@ -93,7 +93,7 @@ ALF_AddButton(HWND win, WORD id, UINT x, UINT y, const TCHAR *text) p.hwnd = hwndButton; p.x = x; p.y = y; - p.width = 5625; + p.width = 0; p.height = 0; p.flags = ALF_QUERYSIZE | ALF_MESSAGEFONT | ALF_APPLYSIZE; |
