Mercurial > dwindows
diff os2/dw.c @ 47:997e9ed670ef
Fixes for box alignment problem on OS/2, crash in dw_bitmap_new() on unix
with certain versions of imlib. And other various code cleanups. Also
initial code for eventual conversion to gdk-pixbuf on unix from imlib.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 02 Nov 2001 10:31:29 +0000 |
parents | 88c9c7410c22 |
children | bf42d08d72d7 |
line wrap: on
line diff
--- a/os2/dw.c Tue Oct 30 10:49:09 2001 +0000 +++ b/os2/dw.c Fri Nov 02 10:31:29 2001 +0000 @@ -596,7 +596,6 @@ int pass, int *usedpadx, int *usedpady) { int z, currentx = 0, currenty = 0; - int vectorx = 0, vectory = 0; int uymax = 0, uxmax = 0; int upymax = 0, upxmax = 0; /* Used for the SIZEEXPAND */ @@ -861,9 +860,6 @@ (*depth)++; - /*tmp->xratio = ((float)((thisbox->items[z].width * thisbox->xratio)-tmp->upx) )/((float)(tmp->minwidth-tmp->upx)); - tmp->yratio = ((float)((thisbox->items[z].height * thisbox->yratio)-tmp->upy))/((float)(tmp->minheight-tmp->upy));*/ - #ifdef DWDEBUG fprintf(f, "2- Resize Box depth %d\r\nx = %d, y = %d, usedx = %d, usedy = %d, usedpadx = %d, usedpady = %d xratio = %f, yratio = %f,\r\nupx = %d, upy = %d, width = %d, height = %d, minwidth = %d, minheight = %d, box xratio = %f, box yratio = %f\r\n\r\n", *depth, x, y, *usedx, *usedy, *usedpadx, *usedpady, tmp->xratio, tmp->yratio, tmp->upx, tmp->upy, thisbox->items[z].width, thisbox->items[z].height, tmp->minwidth, tmp->minheight, thisbox->xratio, thisbox->yratio); @@ -884,6 +880,7 @@ int width = thisbox->items[z].width; int pad = thisbox->items[z].pad; HWND handle = thisbox->items[z].hwnd; + int vectorx, vectory; /* When upxmax != pad*2 then ratios are incorrect. */ vectorx = (int)((width*thisbox->items[z].xratio)-width); @@ -929,7 +926,7 @@ if(boxinfo && boxinfo->grouphwnd) WinSetWindowPos(boxinfo->grouphwnd, HWND_TOP, 0, 0, - width + vectorx, height + vectory, SWP_MOVE | SWP_SIZE /*| SWP_ZORDER*/); + width + vectorx, height + vectory, SWP_MOVE | SWP_SIZE); } @@ -2919,7 +2916,8 @@ hwndframe = WinCreateWindow(HWND_OBJECT, WC_FRAME, NULL, - WS_VISIBLE | WS_CLIPCHILDREN, + WS_VISIBLE | WS_CLIPCHILDREN | + FS_NOBYTEALIGN, 0,0,2000,1000, NULLHANDLE, HWND_TOP, @@ -2952,7 +2950,8 @@ hwndframe = WinCreateWindow(HWND_OBJECT, WC_FRAME, NULL, - WS_VISIBLE, + WS_VISIBLE | + FS_NOBYTEALIGN, 0,0,2000,1000, NULLHANDLE, HWND_TOP, @@ -2991,7 +2990,8 @@ hwndframe = WinCreateWindow(HWND_OBJECT, WC_FRAME, NULL, - WS_VISIBLE | WS_CLIPCHILDREN, + WS_VISIBLE | WS_CLIPCHILDREN | + FS_NOBYTEALIGN, 0,0,2000,1000, NULLHANDLE, HWND_TOP, @@ -5195,7 +5195,8 @@ HWND hwndframe = WinCreateWindow(HWND_OBJECT, WC_FRAME, NULL, - WS_VISIBLE, + WS_VISIBLE | + FS_NOBYTEALIGN, 0,0,2000,1000, NULLHANDLE, HWND_TOP,