Changeset 111 for Mulberry/branches/v4.1d1/MacOS/Sources/Application/Calendar/Calendar_View/ToDo_View/CToDoItem.cp
- Timestamp:
- 10/28/07 23:29:14 (1 year ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
Mulberry/branches/v4.1d1/MacOS/Sources/Application/Calendar/Calendar_View/ToDo_View/CToDoItem.cp
r97 r111 37 37 const float cCheckboxHeight = 12.0; 38 38 const float cTextTopOffset = 2.0; 39 40 const float body_transparency = 1.0; 41 const float line_transparency = 1.0; 42 const float text_transparency = 1.0; 39 43 40 44 // --------------------------------------------------------------------------- … … 338 342 float green = CGUtils::GetCGGreen(mColour); 339 343 float blue = CGUtils::GetCGBlue(mColour); 340 if ( mIsSelected)341 { 342 CGUtils:: UnflattenColours(red, green, blue);344 if (!mIsSelected) 345 { 346 CGUtils::LightenColours(red, green, blue, true); 343 347 } 344 348 … … 366 370 if (mIsSelected) 367 371 { 368 CGUtils::UnflattenColours(red, green, blue);369 372 ::CGContextSetRGBFillColor(inContext, red, green, blue, 1.0); 370 373 } 371 374 else 372 375 { 373 ::CGContextSetRGBFillColor(inContext, red, green, blue, 1.0); 376 CGUtils::LightenColours(red, green, blue, true); 377 ::CGContextSetRGBFillColor(inContext, red, green, blue, body_transparency); 374 378 } 375 379 … … 393 397 box.top += cTextTopOffset; 394 398 box.bottom = box.top + cItemHeight / 2.0; 395 ::CGContextSetGrayFillColor(inContext, mIsSelected ? 1.0 : 0.0, 1.0); 399 float red = CGUtils::GetCGRed(mColour); 400 float green = CGUtils::GetCGGreen(mColour); 401 float blue = CGUtils::GetCGBlue(mColour); 402 if (mIsSelected) 403 { 404 ::CGContextSetGrayFillColor(inContext, (red + green + blue > 2.5) ? 0.0 : 1.0, 1.0); 405 } 406 else 407 { 408 CGUtils::DarkenColours(red, green, blue); 409 ::CGContextSetRGBFillColor(inContext, red, green, blue, text_transparency); 410 } 396 411 MyCFString trunc1(mSummary, kCFStringEncodingUTF8); 397 412 ::TruncateThemeText(trunc1, kThemeSmallSystemFont, kThemeStateActive, box.right - box.left, truncEnd, NULL);