Add Text's popup overshoot property. 60/48160/4
authorVictor Cebollada <v.cebollada@samsung.com>
Tue, 15 Sep 2015 08:12:54 +0000 (09:12 +0100)
committerVíctor Cebollada <v.cebollada@samsung.com>
Fri, 18 Sep 2015 07:39:16 +0000 (00:39 -0700)
Change-Id: I8732b516851996e3ccc83d702f9c39b616b4b495
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h
dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp
dali-toolkit/styles/480x800/dali-toolkit-default-theme.json
dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json

index 2fbf611..5a510d7 100644 (file)
@@ -62,7 +62,8 @@ public:
   {
     enum
     {
-      MAX_SIZE =  PROPERTY_START_INDEX   ///< name "max-size",                The maximum size the Popup can be,              type VECTOR2
+      MAX_SIZE =  PROPERTY_START_INDEX, ///< name "max-size",                The maximum size the Popup can be,              type VECTOR2
+      ENABLE_OVERSHOOT,                 ///< name "enable-overshoot",        Whether the overshoot image is enabled,         type BOOLEAN
     };
   };
 
index eb6efe4..7a32889 100644 (file)
@@ -52,6 +52,7 @@ BaseHandle Create()
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::TextSelectionToolbar, Toolkit::Control, Create );
 
 DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "max-size", VECTOR2, MAX_SIZE )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "enable-overshoot", BOOLEAN, ENABLE_OVERSHOOT )
 
 DALI_TYPE_REGISTRATION_END()
 
@@ -87,7 +88,11 @@ void TextSelectionToolbar::SetProperty( BaseObject* object, Property::Index inde
        impl.SetPopupMaxSize( value.Get< Vector2 >() );
        break;
       }
-
+      case Toolkit::TextSelectionToolbar::Property::ENABLE_OVERSHOOT:
+      {
+        impl.mScrollView.SetOvershootEnabled( value.Get< bool >() );
+        break;
+      }
     } // switch
   } // TextSelectionToolbar
 }
@@ -109,6 +114,11 @@ Property::Value TextSelectionToolbar::GetProperty( BaseObject* object, Property:
         value = impl.GetPopupMaxSize();
         break;
       }
+      case Toolkit::TextSelectionToolbar::Property::ENABLE_OVERSHOOT:
+      {
+        value = impl.mScrollView.IsOvershootEnabled();
+        break;
+      }
     } // switch
   }
   return value;
index 35531e4..ad05fea 100644 (file)
@@ -113,6 +113,10 @@ distributing this software or its derivatives.
         "font-style":"{\"weight\":\"light\"}"
       }
     },
+    "textselectiontoolbar":
+    {
+      "enable-overshoot":true
+    },
     "scrollview":
     {
       "overshoot-effect-color":"B018"
index 935744f..8a0fc66 100644 (file)
@@ -113,6 +113,10 @@ distributing this software or its derivatives.
         "font-style":"{\"weight\":\"light\"}"
       }
     },
+    "textselectiontoolbar":
+    {
+      "enable-overshoot":true
+    },
     "scrollview":
     {
       "overshoot-effect-color":"B018"