diff options
author | harsh.v <harsh.v@samsung.com> | 2013-10-23 13:21:02 +0530 |
---|---|---|
committer | harsh.v <harsh.v@samsung.com> | 2013-10-23 13:21:02 +0530 |
commit | 101c3c76e47b2d9f3e884da51d4cd40dd94b583f (patch) | |
tree | ce82110e8ff757343953738486117f0bc5e12b92 | |
parent | 3e0dca87a3a168081eed40a1def5b981be33ef72 (diff) | |
download | QrCodeGenerator-101c3c76e47b2d9f3e884da51d4cd40dd94b583f.tar.gz QrCodeGenerator-101c3c76e47b2d9f3e884da51d4cd40dd94b583f.tar.bz2 QrCodeGenerator-101c3c76e47b2d9f3e884da51d4cd40dd94b583f.zip |
Fixed issue: N-SE_55844
Change-Id: I0d29e8dcd4d48eabf6cbea8c649ee5c47531b38e
Signed-off-by: harsh.v <harsh.v@samsung.com>
-rw-r--r-- | project/inc/FileManagerForm.h | 1 | ||||
-rw-r--r-- | project/res/screen-density-high/home_type3.png | bin | 3217 -> 0 bytes | |||
-rw-r--r-- | project/res/screen-density-high/message_type3.png | bin | 3699 -> 0 bytes | |||
-rw-r--r-- | project/res/screen-density-xhigh/home_type3.png | bin | 1639 -> 0 bytes | |||
-rw-r--r-- | project/res/screen-density-xhigh/message_type3.png | bin | 3312 -> 0 bytes | |||
-rw-r--r-- | project/src/FileManagerForm.cpp | 21 |
6 files changed, 17 insertions, 5 deletions
diff --git a/project/inc/FileManagerForm.h b/project/inc/FileManagerForm.h index b62ccc9..912a397 100644 --- a/project/inc/FileManagerForm.h +++ b/project/inc/FileManagerForm.h @@ -76,7 +76,6 @@ private: Tizen::Base::String __currentImagePath; Tizen::Base::String __currentPath; Tizen::Ui::Controls::EditField* __pEditField; - Tizen::Graphics::Bitmap* __pFileIcon; Tizen::Graphics::Bitmap* __pFolderIcon; Tizen::Base::String __extension; diff --git a/project/res/screen-density-high/home_type3.png b/project/res/screen-density-high/home_type3.png Binary files differdeleted file mode 100644 index 71a1985..0000000 --- a/project/res/screen-density-high/home_type3.png +++ /dev/null diff --git a/project/res/screen-density-high/message_type3.png b/project/res/screen-density-high/message_type3.png Binary files differdeleted file mode 100644 index 63b5816..0000000 --- a/project/res/screen-density-high/message_type3.png +++ /dev/null diff --git a/project/res/screen-density-xhigh/home_type3.png b/project/res/screen-density-xhigh/home_type3.png Binary files differdeleted file mode 100644 index 0d41338..0000000 --- a/project/res/screen-density-xhigh/home_type3.png +++ /dev/null diff --git a/project/res/screen-density-xhigh/message_type3.png b/project/res/screen-density-xhigh/message_type3.png Binary files differdeleted file mode 100644 index 49532ed..0000000 --- a/project/res/screen-density-xhigh/message_type3.png +++ /dev/null diff --git a/project/src/FileManagerForm.cpp b/project/src/FileManagerForm.cpp index c5605ba..78909d7 100644 --- a/project/src/FileManagerForm.cpp +++ b/project/src/FileManagerForm.cpp @@ -18,6 +18,7 @@ #include "AppResourceId.h" #include "FileManagerForm.h" #include <FSysEnvironment.h> +#include <FMedia.h> using namespace Tizen::App; using namespace Tizen::Ui; @@ -26,6 +27,7 @@ using namespace Tizen::Ui::Scenes; using namespace Tizen::Base; using namespace Tizen::Base::Collection; using namespace Tizen::Graphics; +using namespace Tizen::Media; const String ROOT_PATH = Tizen::System::Environment::GetMediaPath(); @@ -55,7 +57,6 @@ FileManagerForm::Initialize(void) this->AddControl(__pEditField); AppResource* pAppResource = Application::GetInstance()->GetAppResource(); - __pFileIcon = pAppResource->GetBitmapN(L"home_type3.png"); __pFolderIcon = pAppResource->GetBitmapN(L"U01_icon_folder.png"); return true; @@ -201,15 +202,27 @@ FileManagerForm::CreateItem(int index, int itemWidth) { if (fileAtt.IsDirectory()) { - pItem->AddElement(Rectangle(10, 20, 60, 60), ID_FORMAT_BITMAP, *__pFolderIcon, null, null); + pItem->AddElement(Rectangle(10, 10, 80, 80), ID_FORMAT_BITMAP, *__pFolderIcon, null, null); } else { - pItem->AddElement(Rectangle(10, 20, 60, 60), ID_FORMAT_BITMAP, *__pFileIcon, null, null); + result r = E_SUCCESS; + Tizen::Media::Image* pImage = new (std::nothrow) Image(); + TryReturn(pImage != null, null, "Failed to create Image"); + r = pImage->Construct(); + TryReturn(r == E_SUCCESS, null, "Failed to construct Image"); + + Tizen::Graphics::Bitmap* pFileIcon; + + pFileIcon = pImage->DecodeN(__currentPath + "/" + fileName, BITMAP_PIXEL_FORMAT_RGB565, 60, 60); + pItem->AddElement(Rectangle(10, 10, 80, 80), ID_FORMAT_BITMAP, *pFileIcon, null, null); + + delete pFileIcon; + delete pImage; } } - pItem->AddElement(Rectangle(80, 25, 640, 60), ID_FORMAT_STRING, fileName, true); + pItem->AddElement(Rectangle(110, 10, 610, 80), ID_FORMAT_STRING, fileName, true); return pItem; } |