Modified text element bounds calculation in SimpleItem(N_SE-34953)
authorSuhwan_Park <suhwan0927.park@samsung.com>
Thu, 18 Apr 2013 06:15:21 +0000 (15:15 +0900)
committerSuhwan_Park <suhwan0927.park@samsung.com>
Thu, 18 Apr 2013 06:15:21 +0000 (15:15 +0900)
Change-Id: Ia21110ed6f4dea3369d579194b33bd914279aeac
Signed-off-by: Suhwan_Park <suhwan0927.park@samsung.com>
src/ui/controls/FUiCtrl_ListViewItem.cpp

index 9ef5864..98c9ac2 100644 (file)
@@ -1362,6 +1362,21 @@ _ListViewItem::DrawText(FloatRectangle& rect, ListViewItemDrawingStatus status,
                {
                        if ((!_FloatCompare(bounds.width, textDimension.width)) || (!_FloatCompare(bounds.height, textDimension.height)))
                        {
+                               TableViewAnnexStyle style = GetItemStyle();
+                               float annexWidth = 0.0f;
+                               float margin = 0.0f;
+
+                               GET_SHAPE_CONFIG(LISTVIEW::ITEM_ELEMENT_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, margin);
+
+                               if ((style == TABLE_VIEW_ANNEX_STYLE_DETAILED) || (style == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING)
+                                               || (style == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER))
+                               {
+                                       annexWidth = _TableViewItem::GetAnnexWidth(style);
+                               }
+
+                               // initialize element width
+                               bounds.width = GetSize().width - bounds.x - annexWidth - margin;
+
                                bounds.x = rect.x;
                                bounds.y = rect.y + ((rect.height - textDimension.height) / 2.0f);
                                bounds.width = (bounds.width > textDimension.width) ? textDimension.width : bounds.width;