Tizen 2.0 Release
[apps/osp/Phone.git] / src / PhnCustomItemBgElement.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file    PhnCustomItemBgElement.cpp
19  * @brief       Custom Background element class
20  */
21 #include "PhnCustomItemBgElement.h"
22 #include "PhnSettingsConstants.h"
23
24 using namespace Tizen::Graphics;
25 using namespace Tizen::Ui::Controls;
26
27 CustomItemBgElement::CustomItemBgElement(void)
28 {
29 }
30
31 CustomItemBgElement::~CustomItemBgElement(void)
32 {
33 }
34
35 bool
36 CustomItemBgElement::OnDraw(Canvas& canvas, const Rectangle& rect, ListItemDrawingStatus itemStatus)
37 {
38         //drawing boundary for all items.
39         canvas.SetBackgroundColor(Color(142,154,163));
40         canvas.DrawRectangle(rect);
41
42         //draw blue bg color
43         Rectangle blueHeaderRect(0,0,W_LEFT_HEADER_EXPAND_ITEMS,rect.height);
44         canvas.FillRectangle(COLOR_LEFT_HEADER_EXPAND_ITEMS, blueHeaderRect);
45         return true;
46 }