Fix for N_SE-46485 submit/tizen_2.2/20130716.172613 submit/tizen_2.2/20130717.051852 submit/tizen_2.2/20130717.052910
authorAmith Kumar Mahale <amith.m@samsung.com>
Tue, 16 Jul 2013 06:35:03 +0000 (12:05 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Tue, 16 Jul 2013 06:35:03 +0000 (12:05 +0530)
Change-Id: I5e1add0b231167fa7c4692892a0e04447f8de374
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
src/ClYearPanel.cpp

index 188c136..1879e24 100644 (file)
@@ -258,12 +258,28 @@ CalendarPanel::OnClearBackground(void)
 
                                if (EventListPresentationModel::IsSameDay(today, pointer) == true)
                                {
+                                       const Dimension dayTextSize(W_DAY, H_DAY);
                                        Bitmap* pBitmapFocus = ResourceManager::GetBitmapN(IDB_YEAR_DAY_FOCUS);
                                        pCanvas->DrawBitmap(drawRect, *pBitmapFocus);
                                        delete pBitmapFocus;
-                                       pTextDay = __pBitmapTodayText[pointer.GetDay() - 1];
+                                       EnrichedText* pDayText = new (std::nothrow) EnrichedText();
+                                       pDayText->Construct(dayTextSize);
+                                       pDayText->SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
+                                       pDayText->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
+
+                                       TextElement* pTextElement = new (std::nothrow) TextElement();
+                                       pTextElement->Construct(Integer::ToString(today.GetDay()));
+
+                                       Font font;
+                                       font.Construct(FONT_STYLE_PLAIN, FONT_SIZE_DAY);
+                                       pTextElement->SetFont(font);
+                                       pTextElement->SetTextColor(Color(COLOR_DAY_FOCUS));
+
+                                       pDayText->Add(*pTextElement);
+                                       pCanvas->DrawText(Point(drawRect.x,drawRect.y), *pDayText);
+                                       delete pDayText;
                                }
-                               if (pTextDay != null)
+                               else if (pTextDay != null)
                                {
                                        pCanvas->DrawBitmap(drawRect, *pTextDay);
                                }