87 |
87 |
88 if( !skinUsed ) |
88 if( !skinUsed ) |
89 { |
89 { |
90 iGc->Clear( aItemTextRect ); |
90 iGc->Clear( aItemTextRect ); |
91 } |
91 } |
|
92 TTime today( CalenDateUtils::Today() ); |
|
93 TTime currentDay( iCalendarMonthGrid->FirstDayOfGrid() +TTimeIntervalDays( aItemIndex ) ); |
92 |
94 |
|
95 TBool underline( CalenDateUtils::OnSameDay( today, currentDay ) ); |
|
96 if (underline) |
|
97 { |
|
98 TRgb seeThroughBack; |
|
99 AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), |
|
100 seeThroughBack, |
|
101 KAknsIIDQsnOtherColors, |
|
102 EAknsCIQsnOtherColorsCG24); |
|
103 iGc->SetBrushColor(seeThroughBack); |
|
104 iGc->SetPenColor(seeThroughBack); |
|
105 iGc->SetBrushStyle(CGraphicsContext::ESolidBrush); |
|
106 iGc->DrawRect(aItemTextRect); |
|
107 skinUsed = ETrue; |
|
108 } |
93 // Setup colors, mainly try to fetch them from skins. |
109 // Setup colors, mainly try to fetch them from skins. |
94 // FIXME: investigate if this could be done somewhere else, so that we set them to |
110 // FIXME: investigate if this could be done somewhere else, so that we set them to |
95 // properties of grid |
111 // properties of grid |
96 |
112 |
97 CFormattedCellListBoxData::TColors colors; |
113 CFormattedCellListBoxData::TColors colors; |
98 colors.iBack = iBackColor; |
114 colors.iBack = iBackColor; |
99 colors.iText = iTextColor; |
115 colors.iText = iTextColor; |
100 |
116 |
101 if(aItemIsSelected) |
117 if (underline) |
|
118 { |
|
119 AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), |
|
120 colors.iText, |
|
121 KAknsIIDQsnTextColors, |
|
122 EAknsCIQsnTextColorsCG85); |
|
123 } |
|
124 else if(aItemIsSelected) |
102 { |
125 { |
103 // active month days |
126 // active month days |
104 if(aItemIsCurrent) |
127 if(aItemIsCurrent) |
105 { |
128 { |
106 // highlighted day's number is drawn with grid highlight color |
129 // highlighted day's number is drawn with grid highlight color |
130 EAknsCIQsnTextColorsCG21); |
153 EAknsCIQsnTextColorsCG21); |
131 } |
154 } |
132 |
155 |
133 // set underline if current day is today. |
156 // set underline if current day is today. |
134 // (current day is day of item.) |
157 // (current day is day of item.) |
135 TTime today( CalenDateUtils::Today() ); |
|
136 TTime currentDay( iCalendarMonthGrid->FirstDayOfGrid() +TTimeIntervalDays( aItemIndex ) ); |
|
137 |
158 |
138 TBool underline( CalenDateUtils::OnSameDay( today, currentDay ) ); |
|
139 iGc->SetUnderlineStyle( underline ? EUnderlineOn : EUnderlineOff ); |
159 iGc->SetUnderlineStyle( underline ? EUnderlineOn : EUnderlineOff ); |
140 |
160 |
141 TPtrC cellData( iModel->ItemText(aItemIndex) ); |
161 TPtrC cellData( iModel->ItemText(aItemIndex) ); |
142 FormattedCellData()->Draw(Properties(aItemIndex), *iGc, &cellData, aItemTextRect, aItemIsCurrent, colors); |
162 FormattedCellData()->Draw(Properties(aItemIndex), *iGc, &cellData, aItemTextRect, aItemIsCurrent, colors); |
143 |
163 |