Changeset 111

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

Tweak the look of calendar events.

Location:
Mulberry/branches/v4.1d1/MacOS/Sources/Application/Calendar
Files:
9 modified

Legend:

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

    r97 r111  
    4141        Default constructor */ 
    4242 
     43const float body_transparency = 0.75; 
     44const float line_transparency = 1.0; 
     45const float text_transparency = 0.9; 
     46 
    4347CCalendarEventBase::CCalendarEventBase(const SPaneInfo  &inPaneInfo) : 
    4448        LPane(inPaneInfo) 
     
    8589 
    8690                // Force immediate redraw 
    87                 Draw(NULL); 
     91                Rect    refreshRect; 
     92 
     93                if (CalcPortExposedRect(refreshRect)) { 
     94                        StRegion update = refreshRect; 
     95                        mTable->Draw(update); 
     96                } 
    8897        } 
    8998} 
     
    212221                box.bottom = box.top + 16; 
    213222        } 
    214         ::CGContextSetGrayFillColor(inContext, mIsSelected && !IsFreeBusy() ? 1.0 : 0.0, 1.0); 
     223 
     224        // Use white colour for selected item 
     225        float red = CGUtils::GetCGRed(mColour); 
     226        float green = CGUtils::GetCGGreen(mColour); 
     227        float blue = CGUtils::GetCGBlue(mColour); 
     228        if (mIsSelected) 
     229        { 
     230                ::CGContextSetGrayFillColor(inContext, (red + green + blue > 2.5) ? 0.0 : 1.0, 1.0); 
     231        } 
     232        else 
     233        { 
     234                CGUtils::DarkenColours(red, green, blue); 
     235                ::CGContextSetRGBFillColor(inContext, red, green, blue, text_transparency); 
     236        } 
     237 
    215238        MyCFString trunc(mTitle, kCFStringEncodingUTF8); 
    216239        if (mHoriz) 
     
    236259                        ::CGContextAddLineToPoint(inContext, rect.origin.x, rect.origin.y + rect.size.height); 
    237260                } 
    238                 ::CGContextSetGrayStrokeColor(inContext, 0.0, 1.0); 
     261 
    239262                ::CGContextStrokePath(inContext); 
    240                 ::CGContextClosePath(inContext); 
     263                //::CGContextClosePath(inContext); 
    241264        } 
    242265} 
     
    261284        else 
    262285                rect.size.width -= 1; 
     286        rect.size.height -= 1; 
    263287         
    264288        CGMutablePathRef path = ::CGPathCreateMutable(); 
    265289                 
    266290        // Draw left end (rounded if starts, flat otherwise) 
     291        ::CGPathMoveToPoint(path, NULL, rect.origin.x + rect.size.width / 2.0, rect.origin.y + rect.size.height); 
    267292        if (mStartsInCol) 
    268293        { 
    269294                if (mAllDay) 
    270295                { 
    271                         ::CGPathMoveToPoint(path, NULL, rect.origin.x + rect.size.height / 2.0, rect.origin.y + rect.size.height); 
    272                         ::CGPathAddArc(path, NULL, rect.origin.x + rect.size.height/ 2.0, rect.origin.y + rect.size.height/ 2.0, rect.size.height/ 2.0, pi / 2.0, 1.5 * pi, 0); 
     296                        ::CGPathAddArcToPoint(path, NULL, rect.origin.x, rect.origin.y + rect.size.height, rect.origin.x, rect.origin.y + rect.size.height / 2.0, rect.size.height/ 2.0); 
     297                        ::CGPathAddArcToPoint(path, NULL, rect.origin.x, rect.origin.y, rect.origin.x + rect.size.width / 2.0, rect.origin.y, rect.size.height/ 2.0); 
    273298                } 
    274299                else 
    275300                { 
    276                         ::CGPathMoveToPoint(path, NULL, rect.origin.x, rect.origin.y + rect.size.height); 
     301                        ::CGPathAddLineToPoint(path, NULL, rect.origin.x, rect.origin.y + rect.size.height); 
    277302                        ::CGPathAddLineToPoint(path, NULL, rect.origin.x, rect.origin.y); 
    278                 } 
    279         } 
    280         else 
    281         { 
    282                 ::CGPathMoveToPoint(path, NULL, rect.origin.x + rect.size.height / 2.0, rect.origin.y + rect.size.height); 
     303                        ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width / 2.0, rect.origin.y); 
     304                } 
     305        } 
     306        else 
     307        { 
     308                ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.height / 2.0, rect.origin.y + rect.size.height); 
    283309                ::CGPathAddLineToPoint(path, NULL, rect.origin.x, rect.origin.y + rect.size.height); 
    284310                ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.height / 6.0, rect.origin.y +  rect.size.height * 5.0 / 6.0); 
     
    288314                ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.height / 6.0, rect.origin.y + rect.size.height / 6.0); 
    289315                ::CGPathAddLineToPoint(path, NULL, rect.origin.x, rect.origin.y); 
    290         } 
    291  
    292         // Draw top line 
    293         if (mAllDay) 
    294                 ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width - rect.size.height / 2.0, rect.origin.y); 
    295         else 
    296                 ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y); 
     316                ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width / 2.0, rect.origin.y); 
     317        } 
    297318 
    298319        // Draw right end (rounded if starts, flat otherwise) 
     
    300321        { 
    301322                if (mAllDay) 
    302                         ::CGPathAddArc(path, NULL, rect.origin.x + rect.size.width - rect.size.height/ 2.0, rect.origin.y + rect.size.height/ 2.0, rect.size.height/ 2.0, 1.5 * pi, pi / 2.0, 0); 
     323                { 
     324                        ::CGPathAddArcToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y, rect.origin.x + rect.size.width, rect.origin.y + rect.size.height / 2.0, rect.size.height/ 2.0); 
     325                        ::CGPathAddArcToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y + rect.size.height, rect.origin.x + rect.size.width / 2.0, rect.origin.y + rect.size.height, rect.size.height/ 2.0); 
     326                } 
    303327                else 
     328                { 
     329                        ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y); 
    304330                        ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y + rect.size.height); 
     331                        ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width / 2.0, rect.origin.y + rect.size.height); 
     332                } 
    305333        } 
    306334        else 
     
    313341                ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y + rect.size.height * 5.0 / 6.0); 
    314342                ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width - rect.size.height / 6.0, rect.origin.y + rect.size.height); 
    315         } 
    316  
    317         // Draw bottom line 
    318         if (mAllDay) 
    319                 ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.height / 2.0, rect.origin.y + rect.size.height); 
    320         else 
    321                 ::CGPathAddLineToPoint(path, NULL, rect.origin.x, rect.origin.y + rect.size.height); 
     343                ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width / 2.0, rect.origin.y + rect.size.height); 
     344        } 
    322345         
    323346        // Close path 
     
    328351        float green = CGUtils::GetCGGreen(mColour); 
    329352        float blue = CGUtils::GetCGBlue(mColour); 
    330         float line_factor = IsFreeBusy() ? 1.0 : 0.6; 
     353        float line_factor = IsFreeBusy() ? 1.0 : 1.0; 
    331354        if (mIsSelected) 
    332355        { 
    333                 CGUtils::UnflattenColours(red, green, blue); 
     356                ::CGContextSetRGBStrokeColor(inContext, red * line_factor, green * line_factor, blue * line_factor, 1.0); 
    334357                if (IsFreeBusy()) 
    335358                        ::CGContextSetGrayFillColor(inContext, 1.0, 1.0); 
    336359                else 
    337360                        ::CGContextSetRGBFillColor(inContext, red, green, blue, 1.0); 
    338                 ::CGContextSetRGBStrokeColor(inContext, red * line_factor, green * line_factor, blue * line_factor, 1.0); 
    339         } 
    340         else 
    341         { 
     361        } 
     362        else 
     363        { 
     364                ::CGContextSetRGBStrokeColor(inContext, red * line_factor, green * line_factor, blue * line_factor, line_transparency); 
     365                CGUtils::LightenColours(red, green, blue); 
    342366                if (IsFreeBusy()) 
    343                         ::CGContextSetGrayFillColor(inContext, 1.0, 1.0); 
     367                        ::CGContextSetGrayFillColor(inContext, 1.0, body_transparency); 
    344368                else 
    345                         ::CGContextSetRGBFillColor(inContext, red, green, blue, 1.0); 
    346                 ::CGContextSetRGBStrokeColor(inContext, red * line_factor, green * line_factor, blue * line_factor, 1.0); 
    347         } 
    348          
     369                        ::CGContextSetRGBFillColor(inContext, red, green, blue, body_transparency); 
     370        } 
     371         
     372        ::CGContextSetLineWidth(inContext, 0.75); 
     373        if (!mAllDay) 
     374                ::CGContextSetShouldAntialias(inContext, false); 
     375 
    349376        ::CGContextAddPath(inContext, path); 
    350377        ::CGContextDrawPath(inContext, kCGPathFillStroke); 
    351          
     378        ::CGContextSetShouldAntialias(inContext, true); 
     379         
     380        ::CGContextSetLineWidth(inContext, 1.0); 
     381 
    352382        // Check for now marker 
    353383        if (!mAllDay && mIsNow) 
    354384        { 
    355                 ::CGContextSetRGBStrokeColor(inContext, 0.95, 0.0, 0.0, 1.0); 
     385                ::CGContextSetRGBStrokeColor(inContext, 0.95, 0.0, 0.0, mIsSelected ? 1.0 : line_transparency); 
    356386                ::CGContextAddPath(inContext, path); 
    357387                ::CGContextStrokePath(inContext); 
     
    441471        CGMutablePathRef path = ::CGPathCreateMutable(); 
    442472         
     473        ::CGPathMoveToPoint(path, NULL, rect.origin.x, rect.origin.y + rect.size.height / 2.0); 
    443474        if (mStartsInCol) 
    444475        { 
    445                 // Top-left corner 
    446                 ::CGPathMoveToPoint(path, NULL, rect.origin.x, rect.origin.y + radius); 
    447                 ::CGPathAddArc(path, NULL, rect.origin.x + radius, rect.origin.y + radius, radius, pi, 1.5 * pi, 0); 
    448                  
    449                 // Top line 
    450                 ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width - radius, rect.origin.y); 
    451  
    452                 // Top-right corner 
    453                 ::CGPathAddArc(path, NULL, rect.origin.x + rect.size.width - radius, rect.origin.y + radius, radius, 1.5 * pi, 0.0, 0); 
    454         } 
    455         else 
    456         { 
     476                // Top-left, top-right corners 
     477                ::CGPathAddArcToPoint(path, NULL, rect.origin.x, rect.origin.y, rect.origin.x + rect.size.width / 2.0, rect.origin.y, radius); 
     478                ::CGPathAddArcToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y, rect.origin.x + rect.size.width, rect.origin.y + rect.size.height / 2.0, radius); 
     479        } 
     480        else 
     481        { 
     482                ::CGPathAddLineToPoint(path, NULL, rect.origin.x, rect.origin.y + radius); 
     483 
    457484                // Draw jagged top edge 
    458                 ::CGPathMoveToPoint(path, NULL, rect.origin.x, rect.origin.y + radius); 
    459485                uint32_t ctr = 0; 
    460486                for(float x_pos = rect.origin.x; x_pos < rect.origin.x + rect.size.width; x_pos += cJaggedEdgeHeight, ctr++) 
     
    463489                // Draw last segment 
    464490                ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y + ((ctr % 2 == 1) ? 0.0 : cJaggedEdgeHeight)); 
    465         } 
    466  
    467         // Right line 
    468         ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y + rect.size.height - radius); 
     491                ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y + rect.size.height / 2.0); 
     492        } 
    469493 
    470494        if (mEndsInCol) 
    471495        { 
    472                 // Bottom-right corner 
    473                 ::CGPathAddArc(path, NULL, rect.origin.x + rect.size.width - radius, rect.origin.y + rect.size.height - radius, radius, 0.0, pi / 2.0, 0); 
    474                  
    475                 // Bottom line 
    476                 ::CGPathAddLineToPoint(path, NULL, rect.origin.x + radius, rect.origin.y + rect.size.height); 
    477  
    478                 // Bottom-left corner 
    479                 ::CGPathAddArc(path, NULL, rect.origin.x + radius, rect.origin.y + rect.size.height - radius, radius, pi / 2.0, pi, 0); 
    480         } 
    481         else 
    482         { 
     496                // Bottom-right, bottom-left corners 
     497                ::CGPathAddArcToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y + rect.size.height, rect.origin.x + rect.size.width / 2.0, rect.origin.y + rect.size.height, radius); 
     498                ::CGPathAddArcToPoint(path, NULL, rect.origin.x, rect.origin.y + rect.size.height, rect.origin.x, rect.origin.y + rect.size.height / 2.0, radius); 
     499        } 
     500        else 
     501        { 
     502                ::CGPathAddLineToPoint(path, NULL, rect.origin.x + rect.size.width, rect.origin.y + rect.size.height - radius); 
     503 
    483504                // Draw jagged bottom edge 
    484505                uint32_t ctr = 0; 
     
    486507                        ::CGPathAddLineToPoint(path, NULL, x_pos, rect.origin.y + rect.size.height - ((ctr % 2 == 1) ? 0.0 : cJaggedEdgeHeight)); 
    487508                 
    488                 // Draw last segment 
     509                // Draw last segments 
    489510                ::CGPathAddLineToPoint(path, NULL, rect.origin.x, rect.origin.y + rect.size.height - ((ctr % 2 == 0) ? 0.0 : cJaggedEdgeHeight)); 
    490         } 
    491  
    492         // Left line 
    493         ::CGPathAddLineToPoint(path, NULL, rect.origin.x, rect.origin.y + radius); 
     511                ::CGPathAddLineToPoint(path, NULL, rect.origin.x, rect.origin.y + rect.size.height / 2.0); 
     512        } 
    494513 
    495514        // Close the path 
     
    500519        float green = CGUtils::GetCGGreen(mColour); 
    501520        float blue = CGUtils::GetCGBlue(mColour); 
    502         float line_factor = IsFreeBusy() ? 1.0 : 0.6; 
     521        float line_factor = IsFreeBusy() ? 1.0 : 1.0; 
    503522        if (mIsSelected) 
    504523        { 
    505                 CGUtils::UnflattenColours(red, green, blue); 
     524                ::CGContextSetRGBStrokeColor(inContext, red * line_factor, green * line_factor, blue * line_factor, 1.0); 
    506525                if (IsFreeBusy()) 
    507526                        ::CGContextSetGrayFillColor(inContext, 1.0, 1.0); 
    508527                else 
    509528                        ::CGContextSetRGBFillColor(inContext, red, green, blue, 1.0); 
    510                 ::CGContextSetRGBStrokeColor(inContext, red * line_factor, green * line_factor, blue * line_factor, 1.0); 
    511         } 
    512         else 
    513         { 
     529        } 
     530        else 
     531        { 
     532                ::CGContextSetRGBStrokeColor(inContext, red * line_factor, green * line_factor, blue * line_factor, line_transparency); 
     533                CGUtils::LightenColours(red, green, blue); 
    514534                if (IsFreeBusy()) 
    515                         ::CGContextSetGrayFillColor(inContext, 1.0, 1.0); 
     535                        ::CGContextSetGrayFillColor(inContext, 1.0, body_transparency); 
    516536                else 
    517                         ::CGContextSetRGBFillColor(inContext, red, green, blue, 1.0); 
    518                 ::CGContextSetRGBStrokeColor(inContext, red * line_factor, green * line_factor, blue * line_factor, 1.0); 
     537                        ::CGContextSetRGBFillColor(inContext, red, green, blue, body_transparency); 
    519538        } 
    520539         
    521540        if (IsFreeBusy()) 
    522541                ::CGContextSetLineWidth(inContext, 5.0); 
     542        else 
     543                ::CGContextSetLineWidth(inContext, 0.5); 
    523544         
    524545        ::CGContextAddPath(inContext, path); 
    525546        ::CGContextDrawPath(inContext, kCGPathFillStroke); 
    526547 
    527         if (IsFreeBusy()) 
    528                 ::CGContextSetLineWidth(inContext, 1.0); 
     548        ::CGContextSetLineWidth(inContext, 1.0); 
    529549 
    530550        // Check for now marker 
    531551        if (mIsNow) 
    532552        { 
    533                 ::CGContextSetRGBStrokeColor(inContext, 0.95, 0.0, 0.0, 1.0); 
     553                ::CGContextSetRGBStrokeColor(inContext, 0.95, 0.0, 0.0, mIsSelected ? 1.0 : line_transparency); 
    534554                ::CGContextAddPath(inContext, path); 
    535555                ::CGContextStrokePath(inContext); 
  • Mulberry/branches/v4.1d1/MacOS/Sources/Application/Calendar/Calendar_View/Day_Week_View/CDayWeekTable.cp

    r97 r111  
    4242const uint32_t cEventMargin = 4; 
    4343 
     44const float line_gray = 0.75; 
     45const float line_gray_lighter = 0.875; 
     46 
    4447// --------------------------------------------------------------------------- 
    4548//      CDayWeekTable                                                                                                             [public] 
     
    211214        ::CGContextMoveToPoint(inContext, adjustedRect.origin.x, adjustedRect.origin.y); 
    212215        ::CGContextAddLineToPoint(inContext, adjustedRect.origin.x, adjustedRect.origin.y + adjustedRect.size.height); 
    213         ::CGContextSetGrayStrokeColor(inContext, 0.5, 1.0); 
     216        ::CGContextSetGrayStrokeColor(inContext, line_gray, 1.0); 
    214217        ::CGContextStrokePath(inContext); 
    215         ::CGContextClosePath(inContext); 
     218        //::CGContextClosePath(inContext); 
    216219 
    217220        // Right-side only for last column 
     
    221224                ::CGContextMoveToPoint(inContext, adjustedRect.origin.x + adjustedRect.size.width, adjustedRect.origin.y); 
    222225                ::CGContextAddLineToPoint(inContext, adjustedRect.origin.x + adjustedRect.size.width, adjustedRect.origin.y + adjustedRect.size.height); 
    223                 ::CGContextSetGrayStrokeColor(inContext, 0.5, 1.0); 
     226                ::CGContextSetGrayStrokeColor(inContext, line_gray, 1.0); 
    224227                ::CGContextStrokePath(inContext); 
    225                 ::CGContextClosePath(inContext); 
     228                //::CGContextClosePath(inContext); 
    226229        } 
    227230 
     
    233236                ::CGContextMoveToPoint(inContext, adjustedRect.origin.x, adjustedRect.origin.y); 
    234237                ::CGContextAddLineToPoint(inContext, adjustedRect.origin.x + adjustedRect.size.width, adjustedRect.origin.y); 
    235                 ::CGContextSetGrayStrokeColor(inContext, (inCell.row % 2 == 1) && (inCell.row != 1) ? 0.75 : 0.5, 1.0); 
     238                ::CGContextSetGrayStrokeColor(inContext, (inCell.row % 2 == 1) && (inCell.row != 1) ? line_gray_lighter : line_gray, 1.0); 
    236239                ::CGContextStrokePath(inContext); 
    237                 ::CGContextClosePath(inContext); 
     240                //::CGContextClosePath(inContext); 
    238241        } 
    239242 
     
    244247                ::CGContextMoveToPoint(inContext, adjustedRect.origin.x, adjustedRect.origin.y + adjustedRect.size.height); 
    245248                ::CGContextAddLineToPoint(inContext, adjustedRect.origin.x + adjustedRect.size.width, adjustedRect.origin.y + adjustedRect.size.height); 
    246                 ::CGContextSetGrayStrokeColor(inContext, (inCell.row % 2 == 1) && (inCell.row != 1) ? 0.75 : 0.5, 1.0); 
     249                ::CGContextSetGrayStrokeColor(inContext, (inCell.row % 2 == 1) && (inCell.row != 1) ? line_gray_lighter : line_gray, 1.0); 
    247250                ::CGContextStrokePath(inContext); 
    248                 ::CGContextClosePath(inContext); 
     251                //::CGContextClosePath(inContext); 
    249252        } 
    250253         
     
    368371                ::CGContextSetRGBStrokeColor(inContext, 0.95, 0.0, 0.0, 1.0); 
    369372                ::CGContextStrokePath(inContext); 
    370                 ::CGContextClosePath(inContext); 
     373                //::CGContextClosePath(inContext); 
    371374        } 
    372375} 
  • Mulberry/branches/v4.1d1/MacOS/Sources/Application/Calendar/Calendar_View/Free_Busy_View/CFreeBusyTable.cp

    r97 r111  
    138138 
    139139                // Red for busy, green for free, blue for tentative, grey for unavailable 
    140                 float red = 0.5; 
    141                 float green = 0.5; 
    142                 float blue = 0.5; 
     140                float red = 0.0; 
     141                float green = 0.0; 
     142                float blue = 0.0; 
    143143                switch((*iter).first) 
    144144                { 
     
    150150                        break; 
    151151                case iCal::CICalendarFreeBusy::eBusyUnavailable: 
    152                         red = 0.75; 
    153                         green = 0.75; 
    154                         blue = 0.75; 
     152                        red = 0.25; 
     153                        green = 0.25; 
     154                        blue = 0.25; 
    155155                        break; 
    156156                case iCal::CICalendarFreeBusy::eBusy: 
     
    158158                        break; 
    159159                } 
    160                 CGUtils::UnflattenColours(red, green, blue); 
     160                CGUtils::LightenColours(red, green, blue); 
    161161 
    162162                // Draw it 
     
    193193        ::CGContextSetGrayStrokeColor(inContext, (inCell.col > 2) ? 0.75 : 0.5, 1.0); 
    194194        ::CGContextStrokePath(inContext); 
    195         ::CGContextClosePath(inContext); 
     195        //::CGContextClosePath(inContext); 
    196196 
    197197        // Right-side only for last column 
     
    203203                ::CGContextSetGrayStrokeColor(inContext, 0.5, 1.0); 
    204204                ::CGContextStrokePath(inContext); 
    205                 ::CGContextClosePath(inContext); 
     205                //::CGContextClosePath(inContext); 
    206206        } 
    207207 
     
    212212        ::CGContextSetGrayStrokeColor(inContext, 0.5, 1.0); 
    213213        ::CGContextStrokePath(inContext); 
    214         ::CGContextClosePath(inContext); 
     214        //::CGContextClosePath(inContext); 
    215215 
    216216        // Bottom-side for last row 
     
    222222                ::CGContextSetGrayStrokeColor(inContext, 0.5, 1.0); 
    223223                ::CGContextStrokePath(inContext); 
    224                 ::CGContextClosePath(inContext); 
     224                //::CGContextClosePath(inContext); 
    225225        } 
    226226         
  • Mulberry/branches/v4.1d1/MacOS/Sources/Application/Calendar/Calendar_View/Month_View/CMonthTable.cp

    r74 r111  
    3333const uint32_t cEventHeight = 16; 
    3434 
     35const float line_gray = 0.75; 
     36const float line_gray_lighter = 0.875; 
     37 
    3538// --------------------------------------------------------------------------- 
    3639//      CMonthTable                                                                                                               [public] 
     
    120123        ::CGContextSetShouldAntialias(inContext, false); 
    121124         
    122         ::CGContextSetGrayStrokeColor(inContext, 0.5, 1.0); 
     125        ::CGContextSetGrayStrokeColor(inContext, line_gray, 1.0); 
    123126        ::CGContextStrokeRect(inContext, adjustedRect); 
    124127         
  • 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</