From: Victor Cebollada Date: Tue, 15 Sep 2015 08:12:54 +0000 (+0100) Subject: Add Text's popup overshoot property. X-Git-Tag: dali_1.1.4~19^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=078dca3e0e630cd8f607e325ff7bd95ca37a394a Add Text's popup overshoot property. Change-Id: I8732b516851996e3ccc83d702f9c39b616b4b495 Signed-off-by: Victor Cebollada --- diff --git a/dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h b/dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h index 2fbf611..5a510d7 100644 --- a/dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h +++ b/dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h @@ -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 }; }; diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp index eb6efe4..7a32889 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp @@ -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; diff --git a/dali-toolkit/styles/480x800/dali-toolkit-default-theme.json b/dali-toolkit/styles/480x800/dali-toolkit-default-theme.json index 35531e4..ad05fea 100644 --- a/dali-toolkit/styles/480x800/dali-toolkit-default-theme.json +++ b/dali-toolkit/styles/480x800/dali-toolkit-default-theme.json @@ -113,6 +113,10 @@ distributing this software or its derivatives. "font-style":"{\"weight\":\"light\"}" } }, + "textselectiontoolbar": + { + "enable-overshoot":true + }, "scrollview": { "overshoot-effect-color":"B018" diff --git a/dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json b/dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json index 935744f..8a0fc66 100644 --- a/dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json +++ b/dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json @@ -113,6 +113,10 @@ distributing this software or its derivatives. "font-style":"{\"weight\":\"light\"}" } }, + "textselectiontoolbar": + { + "enable-overshoot":true + }, "scrollview": { "overshoot-effect-color":"B018"