Changeset 500 for trunk/src/user32/new/uitools.cpp
- Timestamp:
- Aug 15, 1999, 9:11:02 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/uitools.cpp
r407 r500 1 /* $Id: uitools.cpp,v 1. 2 1999-08-03 21:22:34 sandervlExp $ */1 /* $Id: uitools.cpp,v 1.3 1999-08-15 19:11:02 cbratschi Exp $ */ 2 2 /* 3 3 * User Interface Functions … … 462 462 LTInnerI = RBInnerI = LTRBInnerFlat[uType & (BDR_INNER|BDR_OUTER)]; 463 463 LTOuterI = RBOuterI = LTRBOuterFlat[uType & (BDR_INNER|BDR_OUTER)]; 464 465 /* Bertho Stultiens states above that this function exactly matches win95 466 * In win98 BF_FLAT rectangels have an inner border same color as the 467 * middle (COLOR_BTNFACE). I believe it's the same for win95 but since 468 * I don't know I go with Bertho and just sets it for win98 until proven 469 * otherwise. 470 * Dennis Björklund, 10 June, 99 471 */ 472 if(LTInnerI != -1 ) 473 LTInnerI = RBInnerI = COLOR_BTNFACE; 464 474 } 465 475 else if(uFlags & BF_SOFT) … … 488 498 if(RBOuterI != -1) RBOuterPen = GetSysColorPen(RBOuterI); 489 499 490 if((uFlags & BF_MIDDLE) && retval)491 {492 FillRect(hdc, &InnerRect, GetSysColorBrush(uFlags & BF_MONO ?493 COLOR_WINDOW : COLOR_BTNFACE));494 }495 496 500 MoveToEx(hdc, 0, 0, &SavePoint); 497 501 … … 545 549 } 546 550 547 /* Adjust rectangle if asked */ 548 if(uFlags & BF_ADJUST) 551 if( ((uFlags & BF_MIDDLE) && retval) || (uFlags & BF_ADJUST) ) 549 552 { 550 553 int add = (LTRBInnerMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0) 551 554 + (LTRBOuterMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0); 552 if(uFlags & BF_LEFT) rc->left += add; 553 if(uFlags & BF_RIGHT) rc->right -= add; 554 if(uFlags & BF_TOP) rc->top += add; 555 if(uFlags & BF_BOTTOM) rc->bottom -= add; 555 556 if(uFlags & BF_LEFT) InnerRect.left += add; 557 if(uFlags & BF_RIGHT) InnerRect.right -= add; 558 if(uFlags & BF_TOP) InnerRect.top += add; 559 if(uFlags & BF_BOTTOM) InnerRect.bottom -= add; 560 561 if((uFlags & BF_MIDDLE) && retval) 562 { 563 FillRect(hdc, &InnerRect, GetSysColorBrush(uFlags & BF_MONO ? 564 COLOR_WINDOW : COLOR_BTNFACE)); 565 } 566 567 if(uFlags & BF_ADJUST) 568 *rc = InnerRect; 556 569 } 557 570 … … 1124 1137 HBRUSH hbsave, hb, hb2; 1125 1138 HPEN hpsave, hp, hp2; 1126 int tri = 310*SmallDiam/1000;1139 int tri = 290*SmallDiam/1000 -1; 1127 1140 int d46, d93; 1128 1141 … … 1140 1153 case DFCS_SCROLLUP: 1141 1154 Line[2].x = myr.left + 470*SmallDiam/1000 + 2; 1142 Line[2].y = myr. top + 313*SmallDiam/1000 + 1;1155 Line[2].y = myr.bottom - 687*SmallDiam/1000 + 1; 1143 1156 Line[0].x = Line[2].x - tri; 1144 1157 Line[1].x = Line[2].x + tri; … … 1147 1160 1148 1161 case DFCS_SCROLLLEFT: 1149 Line[2].x = myr. left + 313*SmallDiam/1000 + 1;1162 Line[2].x = myr.right - 687*SmallDiam/1000 + 1; 1150 1163 Line[2].y = myr.top + 470*SmallDiam/1000 + 2; 1151 1164 Line[0].y = Line[2].y - tri; … … 1242 1255 1243 1256 /* Here do the real scroll-bar controls end up */ 1244 UITOOLS95_DFC_ButtonPush(dc, r, uFlags & 0xff00); 1257 if( ! (uFlags & (0xff00 & ~DFCS_ADJUSTRECT)) ) 1258 /* UITOOLS95_DFC_ButtonPush always uses BF_SOFT which we don't */ 1259 /* want for the normal scroll-arrow button. */ 1260 UITOOLS95_DrawRectEdge( dc, r, EDGE_RAISED, (uFlags&DFCS_ADJUSTRECT) | BF_MIDDLE | BF_RECT); 1261 else 1262 UITOOLS95_DFC_ButtonPush(dc, r, (uFlags & 0xff00) ); 1245 1263 1246 1264 if(uFlags & DFCS_INACTIVE) … … 1253 1271 } 1254 1272 1255 for(i = 0; i < 3; i++) 1256 { 1273 if( (uFlags & DFCS_INACTIVE) || !(uFlags & DFCS_PUSHED) ) 1274 for(i = 0; i < 3; i++) 1275 { 1257 1276 Line[i].x--; 1258 1277 Line[i].y--; 1259 }1278 } 1260 1279 1261 1280 i = uFlags & DFCS_INACTIVE ? COLOR_BTNSHADOW : COLOR_BTNTEXT;
Note:
See TracChangeset
for help on using the changeset viewer.