summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alf/alfbutton.cpp8
-rw-r--r--alf/alfedit.cpp2
-rw-r--r--widgetfactory.cpp2
3 files changed, 6 insertions, 6 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;
diff --git a/alf/alfedit.cpp b/alf/alfedit.cpp
index 7c247b1..2dae626 100644
--- a/alf/alfedit.cpp
+++ b/alf/alfedit.cpp
@@ -28,7 +28,7 @@ ALF__EditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_P
if (!ps->cy) {
ps->cy = tm.tmHeight + 2*app->compatFn->GetSystemMetricsForDpi(
SM_CYEDGE, ALF_CentipointsToPixels(GetParent(hwnd), 7200))
- + 2 /* padding internal to the edit control */
+ + 4 /* padding internal to the edit control */
+ 2 /* external padding to line up with themed button */;
}
}
diff --git a/widgetfactory.cpp b/widgetfactory.cpp
index ec1c28a..57d987e 100644
--- a/widgetfactory.cpp
+++ b/widgetfactory.cpp
@@ -99,7 +99,7 @@ WinMain
ALF_AddEdit(win, ID_ED1, 1, 1, TEXT("Happy Birthday!"));
- ALF_AddButton(win, ID_B1, 2, 1, TEXT("&Go!"));
+ ALF_AddButton(win, ID_B1, 2, 1, TEXT("&Go Go Go!"));
ALF_AddButton(win, ID_B2, 0, 2, TEXT("Oh m&y god,\r\nwho the hell cares?"));
ALF_AddLabel(win, ID_LBL4, 0, 3, TEXT("Editable Combo Box:"));