Arrange popup imgage and draw logic.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Fri, 31 May 2013 02:37:54 +0000 (11:37 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Fri, 31 May 2013 02:37:54 +0000 (11:37 +0900)
Change-Id: I8743d83cf0d30ec626f2e044a0a4d083e10c6155

13 files changed:
res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting_h.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting_h.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting_h.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting_h.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting_h.png [deleted file]
src/ui/FUi_DimmingLayer.cpp
src/ui/controls/FUiCtrl_Popup.cpp
src/ui/inc/FUi_DimmingLayer.h

diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting.png
deleted file mode 100644 (file)
index 093288a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting_h.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting_h.png
deleted file mode 100644 (file)
index 4b5606a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting_h.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting.png
deleted file mode 100644 (file)
index 093288a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting_h.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting_h.png
deleted file mode 100644 (file)
index 4b5606a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting_h.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting.png
deleted file mode 100644 (file)
index a44fad6..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting_h.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting_h.png
deleted file mode 100644 (file)
index 6171ad7..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting_h.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting.png
deleted file mode 100644 (file)
index a44fad6..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting_h.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting_h.png
deleted file mode 100644 (file)
index 4b5606a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting_h.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting.png
deleted file mode 100644 (file)
index a44fad6..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting_h.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting_h.png
deleted file mode 100644 (file)
index 4b5606a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting_h.png and /dev/null differ
index 9ed709b..2775574 100644 (file)
@@ -178,30 +178,7 @@ _DimmingLayer::SetDimmingEnabled(bool enabled)
 
                r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 4);
 
-               Canvas* pCanvas = __pDimmingElement->GetCanvasN();
-
-               Bitmap* pPortraitBitmap = null;
-               Bitmap* pLandscapeBitmap = null;
-               r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_PORTRAIT, BITMAP_PIXEL_FORMAT_ARGB8888, pPortraitBitmap);
-               r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_LANDSCAPE, BITMAP_PIXEL_FORMAT_ARGB8888, pLandscapeBitmap);
-
-               if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
-               {
-                       if (pCanvas)
-                       {
-                               r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.width, size.height), *pPortraitBitmap);
-                       }
-               }
-               else
-               {
-                       if (pCanvas)
-                       {
-                               r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.height, size.width), *pLandscapeBitmap);
-                       }
-               }
-
-               delete pCanvas;
-
+               DrawBackgroundBitmap();
        }
        else
        {
@@ -244,9 +221,50 @@ _DimmingLayer::Rearrange(void)
        {
                __pDimmingElement->SetBounds(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, size.height, size.width));
        }
+
+       DrawBackgroundBitmap();
+
        __pDimmingElement->SetImplicitAnimationEnabled(oldValue);
 
        return r;
 }
 
+result
+_DimmingLayer::DrawBackgroundBitmap(void)
+{
+       result r = E_SUCCESS;
+
+       const FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF();
+
+       Bitmap* pPortraitBitmap = null;
+       Bitmap* pLandscapeBitmap = null;
+       r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_PORTRAIT, BITMAP_PIXEL_FORMAT_ARGB8888, pPortraitBitmap);
+       r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_LANDSCAPE, BITMAP_PIXEL_FORMAT_ARGB8888, pLandscapeBitmap);
+       SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       Canvas* pCanvas = __pDimmingElement->GetCanvasN();
+       r = GetLastResult();
+       SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r));
+       pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+       pCanvas->Clear();
+
+       if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+       {
+               if (pPortraitBitmap)
+               {
+                       r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.width, size.height), *pPortraitBitmap);
+               }
+       }
+       else
+       {
+               if (pLandscapeBitmap)
+               {
+                       r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.height, size.width), *pLandscapeBitmap);
+               }
+       }
+       delete pCanvas;
+
+       return r;
+}
+
 }}   // Tizen::Ui
index 0f8804e..5a4661c 100644 (file)
@@ -89,6 +89,11 @@ _Popup::~_Popup(void)
                _pTitleTextAccessibilityElement->Activate(false);
                _pTitleTextAccessibilityElement = null;
        }
+
+       if (__pIndicator)
+       {
+               __pIndicator->Destroy();
+       }
 }
 
 _Popup*
index a6cfa09..23901ed 100644 (file)
@@ -48,6 +48,7 @@ public:
        result SetDimmingEnabled(bool enabled);
        bool IsDimmingEnabled(void) const;
        result Rearrange(void);
+       result DrawBackgroundBitmap(void);
 
 private:
        _DimmingLayer(const _DimmingLayer& rhs);                /* no impl. */