Fixed draw issue
authorHeeJu Kang <mobum.kang@samsung.com>
Fri, 18 Jan 2013 08:17:11 +0000 (17:17 +0900)
committerHeeJu Kang <mobum.kang@samsung.com>
Fri, 18 Jan 2013 08:17:11 +0000 (17:17 +0900)
Change-Id: Ic52a864c779da5d85383beb4728d7df4da0e33b0
Signed-off-by: HeeJu Kang <mobum.kang@samsung.com>
src/FShell_LiveboxViewPresenter.cpp

index 7604bea..3cae9d2 100644 (file)
@@ -109,19 +109,19 @@ _LiveboxViewPresenter::GetAppIconPath(void) const
 void
 _LiveboxViewPresenter::Draw(void)
 {
-       Bitmap* pBitmap = null;
-       bool updated = __pLiveboxView->IsUpdated();
-
-       if (updated)
+       Bitmap* pBitmap = __pLiveboxView->GetBitmap();
+       bool imageDone = false;
+       
+       if (pBitmap)
        {
-               pBitmap = __pLiveboxView->GetBitmap();
+               imageDone = true;
        }
        else
        {
                pBitmap = __pLiveboxView->GetAppIconBitmap();
        }
 
-       SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_SYSTEM, "Bitmap is invalid (%d).", updated);
+       SysTryReturnVoidResult(NID_UI_CTRL, pBitmap, E_SYSTEM, "Bitmap is invalid (%d).", imageDone);
 
        Dimension liveboxSize = __pLiveboxView->GetSize();
        int bitmapWidth = pBitmap->GetWidth();
@@ -129,7 +129,7 @@ _LiveboxViewPresenter::Draw(void)
 
        Point point(0, 0);
 
-       if (!updated)
+       if (!imageDone)
        {
                if (liveboxSize.width != bitmapWidth)
                {
@@ -148,9 +148,20 @@ _LiveboxViewPresenter::Draw(void)
        pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
        pCanvas->Clear();
 
-       pCanvas->DrawBitmap(point, *pBitmap);
+       if (!imageDone)
+       {
+               pCanvas->DrawBitmap(point, *pBitmap);
+       }
+       else
+       {
+               Rectangle rect = __pLiveboxView->GetBounds();
+               rect.x = 0;
+               rect.y = 0;
+
+               pCanvas->DrawBitmap(rect, *pBitmap);
+       }
 
-       if (!updated)
+       if (!imageDone)
        {
                DrawText(*pCanvas);
        }