apply treshold and toolbar rearrange
authorMyung Jin Kim <critical.kim@samsung.com>
Sun, 14 Apr 2013 06:33:15 +0000 (15:33 +0900)
committerMyung Jin Kim <critical.kim@samsung.com>
Sun, 14 Apr 2013 06:33:15 +0000 (15:33 +0900)
Change-Id: I03ff86e056ae564071166b110b738a79214f50df

src/ui/controls/FUiCtrl_Button.cpp
src/ui/controls/FUiCtrl_Label.cpp
src/ui/controls/FUiCtrl_Tab.cpp
src/ui/controls/FUiCtrl_Toolbar.cpp
src/ui/inc/FUiCtrl_Button.h
src/ui/inc/FUiCtrl_Label.h
src/ui/inc/FUiCtrl_Toolbar.h

index ec96b04..fb54a93 100644 (file)
@@ -146,6 +146,8 @@ _Button::CreateButtonN(void)
 
        pButton->AcquireHandle();
 
+       pButton->SetTouchPressThreshold(SENSITIVE);
+
        return pButton;
 
 CATCH:
index c9d6a3c..11e682a 100644 (file)
@@ -107,6 +107,8 @@ _Label::CreateLabelN(void)
 
        pLabel->AcquireHandle();
 
+       pLabel->SetTouchPressThreshold(SENSITIVE);
+
        return pLabel;
 
 CATCH:
index 33e1c6f..5684faf 100644 (file)
@@ -173,7 +173,7 @@ _Tab::CreateTabN(void)
        pTab->__pGestureLongPress = new (std::nothrow) _TouchLongPressGestureDetector;
        SysTryCatch(NID_UI_CTRL, pTab->__pGestureLongPress, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
-       pTab->__pGestureLongPress->SetDuration(300);
+       pTab->__pGestureLongPress->SetDuration(500);
        pTab->AddGestureDetector(*(pTab->__pGestureLongPress));
        r = pTab->__pGestureLongPress->AddGestureListener(*pTab);
        SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _ITouchGestureEventListener instance could not be set.");
index 61aff5a..419c06e 100644 (file)
@@ -239,6 +239,8 @@ _Toolbar::CreateToolbarN(bool header)
        pToolbar->Initialize(header);
        pToolbar->AcquireHandle();
 
+       pToolbar->SetTouchPressThreshold(SENSITIVE);
+
        return pToolbar;
 }
 
@@ -755,7 +757,7 @@ _Toolbar::InitializeLongPressGesture(void)
        __pLongPressGesture = new (std::nothrow) _TouchLongPressGestureDetector();
        SysTryReturn(NID_UI_CTRL, __pLongPressGesture, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create touch long press gesture.");
 
-       __pLongPressGesture->SetDuration(300);
+       __pLongPressGesture->SetDuration(500);
 
        r = AddGestureDetector(*__pLongPressGesture);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture detector", GetErrorMessage(r));
@@ -1378,6 +1380,8 @@ _Toolbar::RemoveButtonAt(ToolbarButton position)
                __pButtonItems[position] = null;
        }
 
+       RearrangeItems();
+
        return E_SUCCESS;
 }
 
@@ -1411,6 +1415,8 @@ _Toolbar::RemoveItemAt(int itemIndex)
 
        __pItems.erase(__pItems.begin() + itemIndex);
 
+       RearrangeItems();
+
        return E_SUCCESS;
 }
 
index 1a00b6e..243dd37 100644 (file)
@@ -323,6 +323,8 @@ private:
        Tizen::Graphics::FloatRectangle __userDefinedTextArea;
 
        Tizen::Ui::_AccessibilityElement* __pTextElement;
+
+       static const float SENSITIVE = 0.08f;
 };     // _Button
 
 }}} // Tizen::Ui::Controls
index 4f359a8..e17f3bd 100644 (file)
@@ -155,6 +155,8 @@ private:
        float __bottomMargin;
 
        Tizen::Ui::_AccessibilityElement* __pTextElement;
+
+       static const float SENSITIVE = 0.08f;
 }; // _Label
 
 }}} // Tizen::Ui::Controls
index 988eba5..cb63cf7 100644 (file)
@@ -503,6 +503,8 @@ private:
        Tizen::Graphics::FloatRectangle __itemArea;
 
        Tizen::Ui::_AccessibilityElement* __pTitleTextElement;
+
+       static const float SENSITIVE = 0.08f;
 };
 
 }}} // Tizen::Ui::Controls