summaryrefslogtreecommitdiff
path: root/alf/alfcombobox.cpp
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2019-01-25 22:06:18 +0100
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2019-01-25 22:06:18 +0100
commit6b301ea64ca71777e38611d8c49dd119808b4365 (patch)
treeed03de73b802a337b62eafe1ae28f10e6312d8d9 /alf/alfcombobox.cpp
parent55211af76164fe6c39249c14be47363d35a4db0f (diff)
remove edit control margins to match up with button
we'll owner-draw the button to get rid of the margin
Diffstat (limited to 'alf/alfcombobox.cpp')
-rw-r--r--alf/alfcombobox.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/alf/alfcombobox.cpp b/alf/alfcombobox.cpp
index df88730..0444b14 100644
--- a/alf/alfcombobox.cpp
+++ b/alf/alfcombobox.cpp
@@ -153,8 +153,7 @@ ALF__ComboWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (!ps->cy) {
ps->cy = tm.tmHeight + 2*ALF_Compat_GetSystemMetricsForDpi(
SM_CYEDGE, ALF_CentipointsToPixels(GetParent(hwnd), 7200))
- + 4 /* padding internal to the edit control */
- + 2 /* external padding to line up with themed button */;
+ + 4 /* padding internal to the edit control */;
}
}
@@ -241,16 +240,14 @@ ALF__ComboWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
DWORD sel = SendMessage(hwndChild, CB_GETEDITSEL, 0, 0);
SendMessage(hwndChild, CB_SETEDITSEL, 0, -1);
// SWP_NOCOPYBITS because NT 3.51 doesn't properly repaint the drop-down button
- SetWindowPos(hwndChild, NULL, 0, 1, pos->cx, 200, SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOCOPYBITS);
+ SetWindowPos(hwndChild, NULL, 0, 0, pos->cx, 200, SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOCOPYBITS);
SendMessage(hwndChild, CB_SETEDITSEL, 0, (LPARAM)sel);
DWORD heightOffset = 0;
if (LOBYTE(LOWORD(GetVersion())) >= 4) {
heightOffset = - 2*ALF_Compat_GetSystemMetricsForDpi(
SM_CYEDGE, ALF_CentipointsToPixels(GetParent(hwnd), 7200))
- - 4;
- } else {
- heightOffset = -2;
+ - 2;
}
SendMessage(hwndChild, CB_SETITEMHEIGHT, (WPARAM)-1, pos->cy + heightOffset);