Show
Ignore:
Timestamp:
10/28/07 23:29:14 (1 year ago)
Author:
daboo
Message:

Tweak the look of calendar events.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Mulberry/branches/v4.1d1/MacOS/Sources/Application/Calendar/Calendar_View/Summary_View/CSummaryTable.cp

    r74 r111  
    4242const uint32_t cLinkHeight = 16; 
    4343 
     44const float body_transparency = 0.75; 
     45const float line_transparency = 1.0; 
     46const float text_transparency = 0.9; 
     47 
    4448// --------------------------------------------------------------------------- 
    4549//      CSummaryTable                                                                                                             [public] 
     
    217221        float blue = CGUtils::GetCGBlue(event->mColour); 
    218222        if (CellIsSelected(inCell) && mDrawSelection) 
    219                 CGUtils::UnflattenColours(red, green, blue); 
     223                ; 
     224        else 
     225                CGUtils::LightenColours(red, green, blue); 
    220226 
    221227        if (!link) 
    222228        { 
    223                 ::CGContextSetRGBFillColor(inContext, red, green, blue, 1.0); 
     229                ::CGContextSetRGBFillColor(inContext, red, green, blue, (CellIsSelected(inCell) && mDrawSelection) ? 1.0 : body_transparency); 
    224230                ::CGContextFillRect(inContext, adjustedRect); 
    225231        } 
     
    233239                ::CGContextSetGrayStrokeColor(inContext, 0.5, 1.0); 
    234240                ::CGContextStrokePath(inContext); 
    235                 ::CGContextClosePath(inContext); 
     241                //::CGContextClosePath(inContext); 
    236242 
    237243                // Right-side only for last column 
     
    243249                        ::CGContextSetGrayStrokeColor(inContext, 0.5, 1.0); 
    244250                        ::CGContextStrokePath(inContext); 
    245                         ::CGContextClosePath(inContext); 
     251                        //::CGContextClosePath(inContext); 
    246252                } 
    247253 
     
    253259                        ::CGContextSetGrayStrokeColor(inContext, 0.5, 1.0); 
    254260                        ::CGContextStrokePath(inContext); 
    255                         ::CGContextClosePath(inContext); 
     261                        //::CGContextClosePath(inContext); 
    256262                } 
    257263 
     
    264270                        ::CGContextSetGrayStrokeColor(inContext, 0.5, 1.0); 
    265271                        ::CGContextStrokePath(inContext); 
    266                         ::CGContextClosePath(inContext); 
     272                        //::CGContextClosePath(inContext); 
    267273                } 
    268274        } 
     
    301307                ::CGContextSetGrayStrokeColor(inContext, 0.0, 1.0); 
    302308                ::CGContextStrokePath(inContext); 
    303                 ::CGContextClosePath(inContext); 
     309                //::CGContextClosePath(inContext); 
    304310                 
    305311        } 
     
    330336        ::CGContextSetShouldAntialias(inContext, true); 
    331337 
    332         ::CGContextSetGrayFillColor(inContext, 0.0, 1.0); 
     338        ::CGContextSetGrayFillColor(inContext, (CellIsSelected(inCell) && mDrawSelection) ? 1.0 : 0.0, 1.0); 
    333339        if (draw_txt) 
    334340        { 
    335341                Rect box = inLocalQDRect; 
    336                 box.bottom -= mTextDescent; 
     342                box.bottom = box.bottom - mTextDescent - 2; 
    337343                ::DrawClippedStringUTF8(inContext, text, box, eDrawString_Left); 
    338344        } 
     
    347353                ::CGContextMoveToPoint(inContext, adjustedRect.origin.x, adjustedRect.origin.y + adjustedRect.size.height / 2); 
    348354                ::CGContextAddLineToPoint(inContext, adjustedRect.origin.x + adjustedRect.size.width, adjustedRect.origin.y + adjustedRect.size.height / 2); 
    349                 ::CGContextSetGrayStrokeColor(inContext, 0.0, 1.0); 
     355                ::CGContextSetGrayStrokeColor(inContext, (CellIsSelected(inCell) && mDrawSelection) ? 1.0 : 0.0, 1.0); 
    350356                ::CGContextStrokePath(inContext); 
    351                 ::CGContextClosePath(inContext); 
     357                //::CGContextClosePath(inContext); 
    352358                 
    353359                // Turn on aliasing for text