changeset 553:788299414ae0

Fixes for resource based bitmap buttons using icons.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 11 Apr 2004 06:42:13 +0000
parents d940dc1ff462
children 6707adaa093d
files os2/dw.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/os2/dw.c	Sun Apr 11 05:58:43 2004 +0000
+++ b/os2/dw.c	Sun Apr 11 06:42:13 2004 +0000
@@ -3029,8 +3029,8 @@
 		if(dw_window_get_data(hwnd, "_dw_disabled"))
 			halftone = DP_HALFTONED;
 
-	x = (width - 16)/2;
-	y = (height - 16)/2;
+		x = (width - 16)/2;
+		y = (height - 16)/2;
 
 		WinDrawPointer(hps, x + indent, y - indent, icon, halftone | DP_MINI);
 		WinReleasePS(hps);
@@ -4625,8 +4625,8 @@
 						  WC_BUTTON,
 						  name,
 						  WS_VISIBLE | BS_PUSHBUTTON |
-						  BS_BITMAP | BS_AUTOSIZE |
-						  BS_NOPOINTERFOCUS,
+						  BS_NOPOINTERFOCUS | BS_AUTOSIZE |
+						  (icon ? 0 : BS_BITMAP),
 						  0,0,2000,1000,
 						  NULLHANDLE,
 						  HWND_TOP,
@@ -4634,15 +4634,15 @@
 						  NULL,
 						  NULL);
 
-	if(icon)
-		dw_window_set_data(tmp, "_dw_button_icon", (void *)icon);
-
 	bubble->id = id;
 	strncpy(bubble->bubbletext, text, BUBBLE_HELP_MAX - 1);
 	bubble->bubbletext[BUBBLE_HELP_MAX - 1] = '\0';
 	bubble->pOldProc = WinSubclassWindow(tmp, _BtProc);
 
 	WinSetWindowPtr(tmp, QWP_USER, bubble);
+
+	if(icon)
+		dw_window_set_data(tmp, "_dw_button_icon", (void *)icon);
 	dw_window_set_data(tmp, "_dw_bitmapbutton", (void *)1);
 	return tmp;
 }