using namespace Tizen::Media;
using namespace Tizen::Ui::Animations;
+namespace {
+static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f;
+}
+
namespace Tizen { namespace Ui { namespace Controls
{
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to Install.", GetErrorMessage(r));
pContextMenu->AcquireHandle();
- pContextMenu->SetTouchPressThreshold(0.08f);
+ pContextMenu->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE);
if (pContextMenu->GetAccessibilityContainer() != null)
{
GET_SHAPE_CONFIG(CONTEXTMENU::LIST_MIN_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, minWidth);
GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ITEM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, minHeight);
pContextMenu->__pScrollPanel = _ScrollPanel::CreateScrollPanelN(FloatRectangle(0.0f, 0.0f, minWidth, minHeight), SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, false, false);
+ pContextMenu->__pScrollPanel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE);
pContextMenu->AttachChild(*(pContextMenu->__pScrollPanel));
}
using namespace Tizen::Base::Runtime;
using namespace Tizen::Graphics::_Text;
+namespace {
+static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f;
static const int CONTEXT_MENU_LIST_ELEMENT_TEXT = 0;
static const int CONTEXT_MENU_LIST_ELEMENT_BITMAP = 1;
+}
namespace Tizen { namespace Ui { namespace Controls
{
int bitmapY = (__itemHeight - __itemBitmapHeight ) / 2;
pLabel->SetBounds(FloatRectangle(__leftMargin, bitmapY, __itemBitmapWidth, __itemBitmapHeight));
+ pLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE);
pItem->AttachChild(*pLabel);
_AccessibilityContainer* pContainer = pLabel->GetAccessibilityContainer();
if (pContainer)
GET_SHAPE_CONFIG(LABEL::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelTopMargin);
textArea.width += 2.0f * labelLeftMargin;
textArea.height += 2.0f * labelTopMargin;
- itemSize.height = __itemHeight + __dividerHeight;
+ itemSize.height = __itemHeight + (__dividerHeight * 2.0f);
itemSize.width = __leftMargin + textArea.width + __rightMargin + bitmapWidth;
itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width;
pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
pLabel->SetTextConfig(__itemFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE);
pItem->AttachChild(*pLabel);
_AccessibilityContainer* pContainer = pLabel->GetAccessibilityContainer();
if (pContainer)
__itemWidth = __itemWidth < itemSize.width ? itemSize.width : __itemWidth;
+ pItem->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE);
return pItem;
}
{
__pContextMenu->GetScrollPanel()->SetBounds(FloatRectangle(bodyRect.x + bodyLeftMargin, bodyRect.y + bodyTopMargin, __layoutSize.width, __layoutSize.height));
int itemCount = __pModel->GetItemCount();
- float itemHeight = __itemHeight + __dividerHeight;
- float layoutClientHeight = itemCount * itemHeight - __dividerHeight;
+ float itemHeight = __itemHeight + (__dividerHeight * 2.0f);
+ float layoutClientHeight = itemCount * itemHeight - (__dividerHeight * 2.0f);
__pContextMenu->GetScrollPanel()->SetClientAreaHeight(layoutClientHeight);
}
int itemMaxCount = CalculateShowItemCount();
int itemCount = __pModel->GetItemCount();
- float itemHeight = __itemHeight + __dividerHeight;
+ float itemHeight = __itemHeight + (__dividerHeight * 2.0f);
FloatDimension layoutSize(__itemWidth, 0.0f);
- float layoutClientHeight = itemCount * itemHeight - __dividerHeight;
- float layoutMaxHeight = itemMaxCount * itemHeight - __dividerHeight;
+ float layoutClientHeight = itemCount * itemHeight - (__dividerHeight * 2.0f);
+ float layoutMaxHeight = itemMaxCount * itemHeight - (__dividerHeight * 2.0f);
if (layoutClientHeight > layoutMaxHeight)
{
__scrollEnable = true;
return;
}
- float itemHeight = __itemHeight + __dividerHeight;
+ float itemHeight = __itemHeight + (__dividerHeight * 2.0f);
float drawItemY = 0.0f;
float x = __pContextMenu->GetBodyRect().x + __leftMargin;