# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1035095308 0 # Node ID ac616f625443665fc955f42b716bed269c89d369 # Parent c5c3ccb84ac784b8505a27e0668136c1dc0cb408 Draw the splitbar solid pale gray. Maybe we should change this at some point. diff -r c5c3ccb84ac7 -r ac616f625443 os2/dw.c --- a/os2/dw.c Sun Oct 20 06:10:31 2002 +0000 +++ b/os2/dw.c Sun Oct 20 06:28:28 2002 +0000 @@ -64,13 +64,6 @@ } #endif -static LONG lColor[SPLITBAR_WIDTH] = -{ - DW_CLR_BLACK, - DW_CLR_PALEGRAY, - DW_CLR_WHITE -}; - typedef struct _sighandler { struct _sighandler *next; @@ -2362,45 +2355,21 @@ break; case WM_PAINT: { - HPS hpsPaint; - RECTL rclPaint; - POINTL ptlStart[SPLITBAR_WIDTH]; - POINTL ptlEnd[SPLITBAR_WIDTH]; - USHORT i; - - hpsPaint = WinBeginPaint(hwnd, 0, 0); - WinQueryWindowRect(hwnd, &rclPaint); - - if(type == BOXHORZ) - { - for(i = 0; i < SPLITBAR_WIDTH; i++) - { - ptlStart[i].x = rclPaint.xLeft + i + start; - ptlStart[i].y = rclPaint.yTop; - - ptlEnd[i].x = rclPaint.xLeft + i + start; - ptlEnd[i].y = rclPaint.yBottom; - } - } - else - { - for(i = 0; i < SPLITBAR_WIDTH; i++) - { - ptlStart[i].x = rclPaint.xLeft; - ptlStart[i].y = rclPaint.yBottom + i + start; - - ptlEnd[i].x = rclPaint.xRight; - ptlEnd[i].y = rclPaint.yBottom + i + start; - } - } - - for(i = 0; i < SPLITBAR_WIDTH; i++) - { - GpiSetColor( hpsPaint, lColor[i]); - GpiMove(hpsPaint, &ptlStart[i]); - GpiLine(hpsPaint, &ptlEnd[i]); - } - WinEndPaint(hpsPaint); + HPS hps; + RECTL rcl; + POINTL ptl[2]; + + hps = WinBeginPaint(hwnd, 0, 0); + WinQueryWindowRect(hwnd, &rcl); + ptl[0].x = rcl.xLeft; + ptl[0].y = rcl.yBottom; + ptl[1].x = rcl.xRight; + ptl[1].y = rcl.yTop; + + GpiSetColor(hps, CLR_PALEGRAY); + GpiMove(hps, &ptl[0]); + GpiBox(hps, DRO_OUTLINEFILL, &ptl[1], 0, 0); + WinEndPaint(hps); } return MRFROMSHORT(FALSE); @@ -2760,6 +2729,30 @@ switch(msg) { +#if 0 /* Why doesn't this work? */ + case WM_PAINT: + { + HPS hps; + RECTL rcl; + POINTL ptl[2]; + + if(oldproc) + return oldproc(hwnd, msg, mp1, mp2); + + hps = WinBeginPaint(hwnd, 0, 0); + WinQueryWindowRect(hwnd, &rcl); + ptl[0].x = rcl.xLeft + 1; + ptl[0].y = rcl.yBottom + 1; + ptl[1].x = rcl.xRight - 1; + ptl[1].y = rcl.yTop - 1; + + GpiSetColor(hps, CLR_BLACK); + GpiMove(hps, &ptl[0]); + GpiBox(hps, DRO_OUTLINE, &ptl[1], 0, 0); + WinEndPaint(hps); + } + return MRFROMSHORT(FALSE); +#endif case WM_SETFOCUS: _run_event(hwnd, msg, mp1, mp2); break;