# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1051422198 0 # Node ID 4ed3b13ee48c11f7ebe3a9d08d16ba6b2df3c45e # Parent eb86c22a9328cc10618f008afd2a80f7b77267ff Code to do the OS/2 style indent when the button is pressed. diff -r eb86c22a9328 -r 4ed3b13ee48c os2/dw.c --- a/os2/dw.c Sun Apr 27 05:39:05 2003 +0000 +++ b/os2/dw.c Sun Apr 27 05:43:18 2003 +0000 @@ -2776,7 +2776,7 @@ return res; } -MRESULT EXPENTRY _button_draw(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, PFNWP oldproc) +MRESULT EXPENTRY _button_draw(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, PFNWP oldproc, int indent) { HPIXMAP pixmap = (HPIXMAP)dw_window_get_data(hwnd, "_dw_hpixmap"); MRESULT res; @@ -2795,7 +2795,7 @@ x = (width - pixmap->width)/2; y = (height - pixmap->height)/2; - dw_pixmap_bitblt(hwnd, 0, x, y, pixmap->width, pixmap->height, 0, pixmap, 0, 0); + dw_pixmap_bitblt(hwnd, 0, x + indent, y + indent, pixmap->width, pixmap->height, 0, pixmap, 0, 0); } return res; } @@ -2821,7 +2821,7 @@ case WM_PAINT: case WM_BUTTON2UP: case WM_BUTTON3UP: - return _button_draw(hwnd, msg, mp1, mp2, oldproc); + return _button_draw(hwnd, msg, mp1, mp2, oldproc, 0); case WM_SETFOCUS: if(mp2) _run_event(hwnd, msg, mp1, mp2); @@ -2836,7 +2836,7 @@ case WM_BUTTON3DBLCLK: if(dw_window_get_data(hwnd, "_dw_disabled")) return (MRESULT)FALSE; - return _button_draw(hwnd, msg, mp1, mp2, oldproc); + return _button_draw(hwnd, msg, mp1, mp2, oldproc, 1); case WM_BUTTON1UP: { SignalHandler *tmp = Root; @@ -2866,7 +2866,7 @@ } } } - return _button_draw(hwnd, msg, mp1, mp2, oldproc); + return _button_draw(hwnd, msg, mp1, mp2, oldproc, 0); case WM_USER: { SignalHandler *tmp = (SignalHandler *)mp1;