summaryrefslogtreecommitdiff
path: root/alf/alfbutton.cpp
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2019-01-01 22:54:54 +0100
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2019-01-01 22:54:54 +0100
commitd19993c9d4891978c0b593eced6376d17aa1ffec (patch)
tree29aad536fbc8d94f5e91309e2be7bc8561d08b8b /alf/alfbutton.cpp
parent4bd97888be6d5967d5b9d3ad9f33860c4067d32c (diff)
change edit and button paddings to look better
Diffstat (limited to 'alf/alfbutton.cpp')
-rw-r--r--alf/alfbutton.cpp8
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;