Changeset 116 for trunk/src/helpers/comctl.c
- Timestamp:
- Nov 1, 2001, 6:43:18 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/comctl.c
r111 r116 133 133 * 134 134 *@@added V0.9.13 (2001-06-21) [umoeller] 135 *@@changed V0.9.16 (2001-10-24) [umoeller]: fixed wrong hatch color and paint offset 136 *@@changed V0.9.16 (2001-10-28) [umoeller]: added bitmap support, fixed bad clip rectangle 135 137 */ 136 138 … … 172 174 { 173 175 // button border: 174 175 176 // now paint button frame 177 178 // make rcl inclusive 176 179 rclWin.xRight--; 177 180 rclWin.yTop--; … … 203 206 cy = rclWin.yTop - rclWin.yBottom; 204 207 205 ptl.x = rclWin.xLeft + ((cx - pxbd->cx MiniIcon) / 2);206 ptl.y = rclWin.yBottom + ((cy - pxbd->c xMiniIcon) / 2);208 ptl.x = rclWin.xLeft + ((cx - pxbd->cxIconOrBitmap) / 2); 209 ptl.y = rclWin.yBottom + ((cy - pxbd->cyIconOrBitmap) / 2); 207 210 208 211 if (fl & XBF_INUSE) … … 214 217 ptl2.y = ptl.y - 2; 215 218 GpiMove(hps, 216 &ptl); 219 &ptl2); // &ptl 220 // duh, typo V0.9.16 (2001-10-24) [umoeller] 217 221 GpiSetPattern(hps, PATSYM_DIAG1); 218 ptl2.x = ptl.x + pxbd->cxMiniIcon + 1; // inclusive! 219 ptl2.y = ptl.y + pxbd->cxMiniIcon + 1; // inclusive! 222 GpiSetColor(hps, RGBCOL_BLACK); // V0.9.16 (2001-10-24) [umoeller] 223 ptl2.x = ptl.x + pxbd->cxIconOrBitmap + 1; // inclusive! 224 ptl2.y = ptl.y + pxbd->cyIconOrBitmap + 1; // inclusive! 220 225 GpiBox(hps, 221 226 DRO_FILL, … … 226 231 227 232 // now paint icon 228 GpiIntersectClipRectangle(hps, &rclWin); // exclusive! 229 WinDrawPointer(hps, 230 // center this in remaining rectl 231 ptl.x + ulOfs, 232 ptl.y - ulOfs, 233 pxbd->hptr, 234 DP_MINI); 233 234 // make rcl inclusive // V0.9.16 (2001-10-28) [umoeller] 235 rclWin.xRight--; 236 rclWin.yTop--; 237 GpiIntersectClipRectangle(hps, 238 &rclWin); // inclusive! 239 240 // center this in remaining rectl 241 ptl.x += ulOfs; 242 ptl.y -= ulOfs; 243 if (fl & XBF_BITMAP) 244 // V0.9.16 (2001-10-28) [umoeller] 245 WinDrawBitmap(hps, 246 pxbd->hptr, // a bitmap really 247 NULL, // entire bitmap 248 &ptl, 249 0, 250 0, 251 DBM_NORMAL); 252 else 253 WinDrawPointer(hps, 254 // center this in remaining rectl 255 ptl.x + ulOfs, 256 ptl.y - ulOfs, 257 pxbd->hptr, 258 DP_MINI); 235 259 } 236 260 }
Note:
See TracChangeset
for help on using the changeset viewer.