# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1081104340 0 # Node ID 291f3eae2c256333ef2b3a120ed198da30a7710b # Parent dac29596615d0799153c259365299355abb3303d Use 16x16 mini icon, and added code to draw the depressed button when using icons. diff -r dac29596615d -r 291f3eae2c25 os2/dw.c --- a/os2/dw.c Sun Apr 04 18:39:17 2004 +0000 +++ b/os2/dw.c Sun Apr 04 18:45:40 2004 +0000 @@ -3008,6 +3008,10 @@ HPIXMAP disable = (HPIXMAP)dw_window_get_data(hwnd, "_dw_hpixmap_disabled"); HPOINTER icon = (HPOINTER)dw_window_get_data(hwnd, "_dw_button_icon"); MRESULT res; + unsigned long width, height; + int x, y; + + dw_window_get_pos_size(hwnd, NULL, NULL, &width, &height); if(!oldproc) res = WinDefWindowProc(hwnd, msg, mp1, mp2); @@ -3021,19 +3025,18 @@ if(dw_window_get_data(hwnd, "_dw_disabled")) halftone = DP_HALFTONED; - WinDrawPointer(hps, 5, 5, icon, halftone); + x = (width - 16)/2; + y = (height - 16)/2; + + WinDrawPointer(hps, x + indent, y - indent, icon, halftone | DP_MINI); WinReleasePS(hps); } else if(pixmap) { - unsigned long width, height; - int x, y; - - dw_window_get_pos_size(hwnd, NULL, NULL, &width, &height); - x = (width - pixmap->width)/2; y = (height - pixmap->height)/2; + if(disable && dw_window_get_data(hwnd, "_dw_disabled")) dw_pixmap_bitblt(hwnd, 0, x + indent, y + indent, pixmap->width, pixmap->height, 0, disable, 0, 0); else