changeset 547:291f3eae2c25

Use 16x16 mini icon, and added code to draw the depressed button when using icons.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 04 Apr 2004 18:45:40 +0000
parents dac29596615d
children 0369176130af
files os2/dw.c
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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