Commit 4e07c8c3498cef7c8dffbc08189be8e169d97f55
[dali_1.2.30] Merge branch 'devel/master'
Change-Id: I4a0a4300a9c1598344bcb257cfc2fcba72ef3006
Showing
11 changed files
with
287 additions
and
40 deletions
com.samsung.dali-demo.xml
| @@ -194,4 +194,7 @@ | @@ -194,4 +194,7 @@ | ||
| 194 | <ui-application appid="clipping.example" exec="/usr/apps/com.samsung.dali-demo/bin/clipping.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> | 194 | <ui-application appid="clipping.example" exec="/usr/apps/com.samsung.dali-demo/bin/clipping.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> |
| 195 | <label>Clipping</label> | 195 | <label>Clipping</label> |
| 196 | </ui-application> | 196 | </ui-application> |
| 197 | + <ui-application appid="pivot.example" exec="/usr/apps/com.samsung.dali-demo/bin/pivot.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> | ||
| 198 | + <label>Clipping</label> | ||
| 199 | + </ui-application> | ||
| 197 | </manifest> | 200 | </manifest> |
examples-reel/dali-examples-reel.cpp
| @@ -59,6 +59,7 @@ int DALI_EXPORT_API main(int argc, char **argv) | @@ -59,6 +59,7 @@ int DALI_EXPORT_API main(int argc, char **argv) | ||
| 59 | demo.AddExample(Example("motion-stretch.example", DALI_DEMO_STR_TITLE_MOTION_STRETCH)); | 59 | demo.AddExample(Example("motion-stretch.example", DALI_DEMO_STR_TITLE_MOTION_STRETCH)); |
| 60 | demo.AddExample(Example("native-image-source.example", DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE)); | 60 | demo.AddExample(Example("native-image-source.example", DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE)); |
| 61 | demo.AddExample(Example("popup.example", DALI_DEMO_STR_TITLE_POPUP)); | 61 | demo.AddExample(Example("popup.example", DALI_DEMO_STR_TITLE_POPUP)); |
| 62 | + demo.AddExample(Example("pivot.example", DALI_DEMO_STR_TITLE_PIVOT)); | ||
| 62 | demo.AddExample(Example("primitive-shapes.example", DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES)); | 63 | demo.AddExample(Example("primitive-shapes.example", DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES)); |
| 63 | demo.AddExample(Example("progress-bar.example", DALI_DEMO_STR_TITLE_PROGRESS_BAR)); | 64 | demo.AddExample(Example("progress-bar.example", DALI_DEMO_STR_TITLE_PROGRESS_BAR)); |
| 64 | demo.AddExample(Example("rendering-line.example", DALI_DEMO_STR_TITLE_RENDERING_DRAW_LINE)); | 65 | demo.AddExample(Example("rendering-line.example", DALI_DEMO_STR_TITLE_RENDERING_DRAW_LINE)); |
examples/pivot/pivot-example.cpp
0 → 100644
| 1 | +/* | ||
| 2 | + * Copyright (c) 2017 Samsung Electronics Co., Ltd. | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + * | ||
| 16 | + */ | ||
| 17 | + | ||
| 18 | +#include <dali-toolkit/dali-toolkit.h> | ||
| 19 | +#include <dali/devel-api/actors/actor-devel.h> | ||
| 20 | + | ||
| 21 | +#include <iostream> | ||
| 22 | + | ||
| 23 | +using namespace Dali; | ||
| 24 | +using namespace Dali::Toolkit; | ||
| 25 | + | ||
| 26 | +namespace | ||
| 27 | +{ | ||
| 28 | +const int TABLE_VIEW_ROWS = 5; | ||
| 29 | +const int TABLE_VIEW_COLUMNS = 3; | ||
| 30 | +const Vector3 TABLE_VIEW_SIZE_MODE_FACTOR( 0.6f, 0.6f, 1.0f ); | ||
| 31 | + | ||
| 32 | +const Quaternion ANIMATION_ROTATION( Degree( 360.0f), Vector3::ZAXIS ); | ||
| 33 | +const AlphaFunction::BuiltinFunction ROTATION_ANIMATION_ALPHA_FUNCTION( AlphaFunction::EASE_IN_OUT ); | ||
| 34 | +const TimePeriod ROTATION_ANIMATION_TIME_PERIOD( 0.0f, 0.5f ); | ||
| 35 | + | ||
| 36 | +const Vector3 ANIMATION_SCALE( 2.0f, 2.0f, 1.0f ); | ||
| 37 | +const AlphaFunction::BuiltinFunction SCALE_ANIMATION_ALPHA_FUNCTION( AlphaFunction::SIN ); | ||
| 38 | +const TimePeriod SCALE_ANIMATION_TIME_PERIOD( 0.15f, 0.85f ); | ||
| 39 | +} // unnamed namespace | ||
| 40 | + | ||
| 41 | +/** | ||
| 42 | + * @brief Demonstrates how to animate a control in a layout-container using the anchor point as the pivot. | ||
| 43 | + * | ||
| 44 | + * Positions of the controls in the layout-container will be set using the top-left of the control. | ||
| 45 | + */ | ||
| 46 | +class PivotController : public ConnectionTracker | ||
| 47 | +{ | ||
| 48 | +public: | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * @brief Constructor. | ||
| 52 | + * @param[in] application Reference to the application instance. | ||
| 53 | + */ | ||
| 54 | + PivotController( Application& application ) | ||
| 55 | + : mApplication( application ) | ||
| 56 | + { | ||
| 57 | + mApplication.InitSignal().Connect( this, &PivotController::Create ); | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | +private: | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * @brief The Init signal is received once (only) during the Application lifetime. | ||
| 64 | + */ | ||
| 65 | + void Create( Application& /* application */ ) | ||
| 66 | + { | ||
| 67 | + // Get a handle to the stage | ||
| 68 | + Stage stage = Stage::GetCurrent(); | ||
| 69 | + stage.SetBackgroundColor( Color::WHITE ); | ||
| 70 | + stage.KeyEventSignal().Connect( this, &PivotController::OnKeyEvent ); | ||
| 71 | + | ||
| 72 | + // Create a table view. | ||
| 73 | + TableView tableView = TableView::New( TABLE_VIEW_ROWS, TABLE_VIEW_COLUMNS ); | ||
| 74 | + tableView.SetAnchorPoint( AnchorPoint::CENTER ); | ||
| 75 | + tableView.SetParentOrigin( ParentOrigin::CENTER ); | ||
| 76 | + tableView.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); | ||
| 77 | + tableView.SetSizeModeFactor( TABLE_VIEW_SIZE_MODE_FACTOR ); | ||
| 78 | + stage.Add( tableView ); | ||
| 79 | + | ||
| 80 | + // Create a tap detector - we are going to rotate an actor round our anchor-point (pivot) when one of our controls is tapped. | ||
| 81 | + mTapDetector = TapGestureDetector::New(); | ||
| 82 | + mTapDetector.DetectedSignal().Connect( this, &PivotController::OnTap ); | ||
| 83 | + | ||
| 84 | + Vector3 anchorPoint( AnchorPoint::CENTER ); // This will be changed depending on the row and column. | ||
| 85 | + | ||
| 86 | + // Add controls to the table-view - each control will have a random color. | ||
| 87 | + for( int row = 0; row < TABLE_VIEW_ROWS; ++row ) | ||
| 88 | + { | ||
| 89 | + anchorPoint.y = ( row % TABLE_VIEW_ROWS ) * ( 1.0f / ( TABLE_VIEW_ROWS - 1 ) ); // Calculate this row's y anchor-point. | ||
| 90 | + | ||
| 91 | + for( int column = 0; column < TABLE_VIEW_COLUMNS; ++column ) | ||
| 92 | + { | ||
| 93 | + anchorPoint.x = ( column % TABLE_VIEW_COLUMNS ) * ( 1.0f / ( TABLE_VIEW_COLUMNS - 1 ) ); // Calculate this column's x anchor-point. | ||
| 94 | + | ||
| 95 | + // Create a control with a randomly chosen background color. | ||
| 96 | + Control control = Control::New(); | ||
| 97 | + control.SetBackgroundColor( Vector4( Random::Range( 0.0f, 1.0f ), Random::Range( 0.0f, 1.0f ), Random::Range( 0.0f, 1.0f ), 1.0f ) ); | ||
| 98 | + control.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); | ||
| 99 | + control.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); // Ensures the position always uses top-left for its calculations. | ||
| 100 | + control.SetAnchorPoint( anchorPoint ); // This anchor-point is used for the rotation and the scale. | ||
| 101 | + | ||
| 102 | + // Add to the table-view | ||
| 103 | + tableView.AddChild( control, TableView::CellPosition( row, column ) ); | ||
| 104 | + | ||
| 105 | + // Attach each control to the tap-detector so we can start the animation around our anchor point. | ||
| 106 | + mTapDetector.Attach( control ); | ||
| 107 | + } | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + /** | ||
| 112 | + * @brief Called when a control is tapped. | ||
| 113 | + * | ||
| 114 | + * Here we will start an animation around our pivot. | ||
| 115 | + */ | ||
| 116 | + void OnTap( Actor actor, const TapGesture& /* tap */ ) | ||
| 117 | + { | ||
| 118 | + // Raise the actor to the top. | ||
| 119 | + DevelActor::RaiseToTop( actor ); | ||
| 120 | + | ||
| 121 | + // Create the animation to rotate and scale our actor. | ||
| 122 | + Animation animation = Animation::New( 1.0f ); | ||
| 123 | + animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), ANIMATION_ROTATION, ROTATION_ANIMATION_ALPHA_FUNCTION, ROTATION_ANIMATION_TIME_PERIOD ); | ||
| 124 | + animation.AnimateTo( Property( actor, Actor::Property::SCALE ), ANIMATION_SCALE, SCALE_ANIMATION_ALPHA_FUNCTION, SCALE_ANIMATION_TIME_PERIOD ); | ||
| 125 | + | ||
| 126 | + // Play the animation. | ||
| 127 | + animation.Play(); | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + /** | ||
| 131 | + * @brief Called when any key event is received | ||
| 132 | + * | ||
| 133 | + * Will use this to quit the application if Back or the Escape key is received | ||
| 134 | + * @param[in] event The key event information | ||
| 135 | + */ | ||
| 136 | + void OnKeyEvent( const KeyEvent& event ) | ||
| 137 | + { | ||
| 138 | + if( event.state == KeyEvent::Down ) | ||
| 139 | + { | ||
| 140 | + if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) | ||
| 141 | + { | ||
| 142 | + mApplication.Quit(); | ||
| 143 | + } | ||
| 144 | + } | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | +private: | ||
| 148 | + | ||
| 149 | + Application& mApplication; ///< Reference to the Application instance. | ||
| 150 | + TapGestureDetector mTapDetector; ///< Used for animating the tapped control. | ||
| 151 | +}; | ||
| 152 | + | ||
| 153 | +int DALI_EXPORT_API main( int argc, char **argv ) | ||
| 154 | +{ | ||
| 155 | + Application application = Application::New( &argc, &argv ); | ||
| 156 | + PivotController test( application ); | ||
| 157 | + application.MainLoop(); | ||
| 158 | + return 0; | ||
| 159 | +} |
examples/video-view/video-view-example.cpp
| @@ -143,13 +143,13 @@ class VideoViewController: public ConnectionTracker | @@ -143,13 +143,13 @@ class VideoViewController: public ConnectionTracker | ||
| 143 | mMenu.Add( mForwardButton ); | 143 | mMenu.Add( mForwardButton ); |
| 144 | 144 | ||
| 145 | mPauseButton.SetVisible( false ); | 145 | mPauseButton.SetVisible( false ); |
| 146 | - mPauseButton.SetDisabled( true ); | 146 | + mPauseButton.SetProperty( Button::Property::DISABLED, true ); |
| 147 | mPlayButton.SetVisible( true ); | 147 | mPlayButton.SetVisible( true ); |
| 148 | - mPlayButton.SetDisabled( false ); | 148 | + mPlayButton.SetProperty( Button::Property::DISABLED, false ); |
| 149 | mStopButton.SetVisible( true ); | 149 | mStopButton.SetVisible( true ); |
| 150 | - mStopButton.SetDisabled( false ); | 150 | + mStopButton.SetProperty( Button::Property::DISABLED, false ); |
| 151 | mResetButton.SetVisible( false ); | 151 | mResetButton.SetVisible( false ); |
| 152 | - mResetButton.SetDisabled( true ); | 152 | + mResetButton.SetProperty( Button::Property::DISABLED, true ); |
| 153 | 153 | ||
| 154 | mPlayButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, PLAY_IMAGE ); | 154 | mPlayButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, PLAY_IMAGE ); |
| 155 | mPlayButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, PLAY_IMAGE ); | 155 | mPlayButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, PLAY_IMAGE ); |
| @@ -198,9 +198,9 @@ class VideoViewController: public ConnectionTracker | @@ -198,9 +198,9 @@ class VideoViewController: public ConnectionTracker | ||
| 198 | if( mIsPlay ) | 198 | if( mIsPlay ) |
| 199 | { | 199 | { |
| 200 | mPauseButton.SetVisible( false ); | 200 | mPauseButton.SetVisible( false ); |
| 201 | - mPauseButton.SetDisabled( true ); | 201 | + mPauseButton.SetProperty( Button::Property::DISABLED, true ); |
| 202 | mPlayButton.SetVisible( true ); | 202 | mPlayButton.SetVisible( true ); |
| 203 | - mPlayButton.SetDisabled( false ); | 203 | + mPlayButton.SetProperty( Button::Property::DISABLED, false ); |
| 204 | 204 | ||
| 205 | mIsPlay = false; | 205 | mIsPlay = false; |
| 206 | mVideoView.Pause(); | 206 | mVideoView.Pause(); |
| @@ -214,9 +214,9 @@ class VideoViewController: public ConnectionTracker | @@ -214,9 +214,9 @@ class VideoViewController: public ConnectionTracker | ||
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | mPauseButton.SetVisible( true ); | 216 | mPauseButton.SetVisible( true ); |
| 217 | - mPauseButton.SetDisabled( false ); | 217 | + mPauseButton.SetProperty( Button::Property::DISABLED, false ); |
| 218 | mPlayButton.SetVisible( false ); | 218 | mPlayButton.SetVisible( false ); |
| 219 | - mPlayButton.SetDisabled( true ); | 219 | + mPlayButton.SetProperty( Button::Property::DISABLED, true ); |
| 220 | 220 | ||
| 221 | mIsPlay = true; | 221 | mIsPlay = true; |
| 222 | mVideoView.Play(); | 222 | mVideoView.Play(); |
| @@ -226,13 +226,13 @@ class VideoViewController: public ConnectionTracker | @@ -226,13 +226,13 @@ class VideoViewController: public ConnectionTracker | ||
| 226 | if( mIsStop ) | 226 | if( mIsStop ) |
| 227 | { | 227 | { |
| 228 | mPauseButton.SetVisible( true ); | 228 | mPauseButton.SetVisible( true ); |
| 229 | - mPauseButton.SetDisabled( false ); | 229 | + mPauseButton.SetProperty( Button::Property::DISABLED, false ); |
| 230 | mPlayButton.SetVisible( false ); | 230 | mPlayButton.SetVisible( false ); |
| 231 | - mPlayButton.SetDisabled( true ); | 231 | + mPlayButton.SetProperty( Button::Property::DISABLED, true ); |
| 232 | mResetButton.SetVisible( false ); | 232 | mResetButton.SetVisible( false ); |
| 233 | - mResetButton.SetDisabled( true ); | 233 | + mResetButton.SetProperty( Button::Property::DISABLED, true ); |
| 234 | mStopButton.SetVisible( true ); | 234 | mStopButton.SetVisible( true ); |
| 235 | - mStopButton.SetDisabled( false ); | 235 | + mStopButton.SetProperty( Button::Property::DISABLED, false ); |
| 236 | 236 | ||
| 237 | mIsStop = false; | 237 | mIsStop = false; |
| 238 | mIsPlay = true; | 238 | mIsPlay = true; |
| @@ -243,13 +243,13 @@ class VideoViewController: public ConnectionTracker | @@ -243,13 +243,13 @@ class VideoViewController: public ConnectionTracker | ||
| 243 | else if( mStopButton.GetId() == button.GetId()) | 243 | else if( mStopButton.GetId() == button.GetId()) |
| 244 | { | 244 | { |
| 245 | mPauseButton.SetVisible( false ); | 245 | mPauseButton.SetVisible( false ); |
| 246 | - mPauseButton.SetDisabled( true ); | 246 | + mPauseButton.SetProperty( Button::Property::DISABLED, true ); |
| 247 | mPlayButton.SetVisible( true ); | 247 | mPlayButton.SetVisible( true ); |
| 248 | - mPlayButton.SetDisabled( false ); | 248 | + mPlayButton.SetProperty( Button::Property::DISABLED, false ); |
| 249 | mResetButton.SetVisible( true ); | 249 | mResetButton.SetVisible( true ); |
| 250 | - mResetButton.SetDisabled( false ); | 250 | + mPlayButton.SetProperty( Button::Property::DISABLED, false ); |
| 251 | mStopButton.SetVisible( false ); | 251 | mStopButton.SetVisible( false ); |
| 252 | - mStopButton.SetDisabled( true ); | 252 | + mStopButton.SetProperty( Button::Property::DISABLED, true ); |
| 253 | 253 | ||
| 254 | mIsStop = true; | 254 | mIsStop = true; |
| 255 | mVideoView.Stop(); | 255 | mVideoView.Stop(); |
examples/visual-transitions/transition-application.cpp
| @@ -35,6 +35,16 @@ | @@ -35,6 +35,16 @@ | ||
| 35 | using namespace Dali; | 35 | using namespace Dali; |
| 36 | using namespace Dali::Toolkit; | 36 | using namespace Dali::Toolkit; |
| 37 | 37 | ||
| 38 | +namespace | ||
| 39 | +{ | ||
| 40 | + | ||
| 41 | +void SetLabelText( Button button, const char* label ) | ||
| 42 | +{ | ||
| 43 | + button.SetProperty( Toolkit::Button::Property::LABEL, label ); | ||
| 44 | +} | ||
| 45 | + | ||
| 46 | +} | ||
| 47 | + | ||
| 38 | namespace Demo | 48 | namespace Demo |
| 39 | { | 49 | { |
| 40 | 50 | ||
| @@ -43,7 +53,6 @@ const char* DALI_LOGO_PATH( DEMO_IMAGE_DIR "Logo-for-demo.png" ); | @@ -43,7 +53,6 @@ const char* DALI_LOGO_PATH( DEMO_IMAGE_DIR "Logo-for-demo.png" ); | ||
| 43 | const char* DALI_ROBOT_MODEL_PATH( DEMO_MODEL_DIR "ToyRobot-Metal.obj" ); | 53 | const char* DALI_ROBOT_MODEL_PATH( DEMO_MODEL_DIR "ToyRobot-Metal.obj" ); |
| 44 | const char* DALI_ROBOT_MATERIAL_PATH( DEMO_MODEL_DIR "ToyRobot-Metal.mtl" ); | 54 | const char* DALI_ROBOT_MATERIAL_PATH( DEMO_MODEL_DIR "ToyRobot-Metal.mtl" ); |
| 45 | 55 | ||
| 46 | - | ||
| 47 | TransitionApplication::TransitionApplication( Application& application ) | 56 | TransitionApplication::TransitionApplication( Application& application ) |
| 48 | : mApplication( application ), | 57 | : mApplication( application ), |
| 49 | mTitle(), | 58 | mTitle(), |
| @@ -151,10 +160,11 @@ void TransitionApplication::Create( Application& application ) | @@ -151,10 +160,11 @@ void TransitionApplication::Create( Application& application ) | ||
| 151 | mActionButtons[i].ClickedSignal().Connect( this, &TransitionApplication::OnActionButtonClicked ); | 160 | mActionButtons[i].ClickedSignal().Connect( this, &TransitionApplication::OnActionButtonClicked ); |
| 152 | actionButtonLayout.AddChild( mActionButtons[i], TableView::CellPosition( 0, 1+i ) ); | 161 | actionButtonLayout.AddChild( mActionButtons[i], TableView::CellPosition( 0, 1+i ) ); |
| 153 | } | 162 | } |
| 154 | - mActionButtons[0].SetLabelText( "Bounce" ); | ||
| 155 | - mActionButtons[1].SetLabelText( "X" ); | ||
| 156 | - mActionButtons[2].SetLabelText( "Y" ); | ||
| 157 | - mActionButtons[3].SetLabelText( "Fade" ); | 163 | + |
| 164 | + SetLabelText( mActionButtons[0], "Bounce" ); | ||
| 165 | + SetLabelText( mActionButtons[1], "X" ); | ||
| 166 | + SetLabelText( mActionButtons[2], "Y" ); | ||
| 167 | + SetLabelText( mActionButtons[3], "Fade" ); | ||
| 158 | 168 | ||
| 159 | contentLayout.Add( actionButtonLayout ); | 169 | contentLayout.Add( actionButtonLayout ); |
| 160 | contentLayout.SetFitHeight(3); | 170 | contentLayout.SetFitHeight(3); |
packaging/com.samsung.dali-demo.spec
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | Name: com.samsung.dali-demo | 3 | Name: com.samsung.dali-demo |
| 4 | Summary: The OpenGLES Canvas Core Demo | 4 | Summary: The OpenGLES Canvas Core Demo |
| 5 | -Version: 1.2.29 | 5 | +Version: 1.2.30 |
| 6 | Release: 1 | 6 | Release: 1 |
| 7 | Group: System/Libraries | 7 | Group: System/Libraries |
| 8 | License: Apache-2.0 | 8 | License: Apache-2.0 |
resources/po/en_GB.po
| @@ -94,6 +94,9 @@ msgstr "Negotiate Size" | @@ -94,6 +94,9 @@ msgstr "Negotiate Size" | ||
| 94 | msgid "DALI_DEMO_STR_TITLE_POPUP" | 94 | msgid "DALI_DEMO_STR_TITLE_POPUP" |
| 95 | msgstr "Popup" | 95 | msgstr "Popup" |
| 96 | 96 | ||
| 97 | +msgid "DALI_DEMO_STR_TITLE_PIVOT" | ||
| 98 | +msgstr "Pivot" | ||
| 99 | + | ||
| 97 | msgid "DALI_DEMO_STR_TITLE_PROGRESS_BAR" | 100 | msgid "DALI_DEMO_STR_TITLE_PROGRESS_BAR" |
| 98 | msgstr "Progress Bar" | 101 | msgstr "Progress Bar" |
| 99 | 102 |
resources/po/en_US.po
| @@ -94,6 +94,9 @@ msgstr "Negotiate Size" | @@ -94,6 +94,9 @@ msgstr "Negotiate Size" | ||
| 94 | msgid "DALI_DEMO_STR_TITLE_POPUP" | 94 | msgid "DALI_DEMO_STR_TITLE_POPUP" |
| 95 | msgstr "Popup" | 95 | msgstr "Popup" |
| 96 | 96 | ||
| 97 | +msgid "DALI_DEMO_STR_TITLE_PIVOT" | ||
| 98 | +msgstr "Pivot" | ||
| 99 | + | ||
| 97 | msgid "DALI_DEMO_STR_TITLE_PROGRESS_BAR" | 100 | msgid "DALI_DEMO_STR_TITLE_PROGRESS_BAR" |
| 98 | msgstr "Progress Bar" | 101 | msgstr "Progress Bar" |
| 99 | 102 |
resources/style/mobile/style-example-theme-one.json.in
| @@ -125,19 +125,21 @@ | @@ -125,19 +125,21 @@ | ||
| 125 | { | 125 | { |
| 126 | "backgroundVisual":{ | 126 | "backgroundVisual":{ |
| 127 | "visualType":"IMAGE", | 127 | "visualType":"IMAGE", |
| 128 | - "url":"{STYLE_DIR}/images/shadowButtonBg.9.png" | 128 | + "url":"{STYLE_DIR}/images/shadowButtonBg.9.png", |
| 129 | + "depthIndex":0 | ||
| 129 | }, | 130 | }, |
| 130 | 131 | ||
| 131 | "checkboxBgVisual":{ | 132 | "checkboxBgVisual":{ |
| 132 | "visualType":"IMAGE", | 133 | "visualType":"IMAGE", |
| 133 | "url":"{STYLE_DIR}/images/CheckBg.png", | 134 | "url":"{STYLE_DIR}/images/CheckBg.png", |
| 134 | "transform":{ | 135 | "transform":{ |
| 135 | - "size":[0.09, 0.28], | 136 | + "size":[0.12, 0.37], |
| 136 | "offset":[30,0], | 137 | "offset":[30,0], |
| 137 | "offsetSizeMode":[1,1,0,0], | 138 | "offsetSizeMode":[1,1,0,0], |
| 138 | "origin":"CENTER_BEGIN", | 139 | "origin":"CENTER_BEGIN", |
| 139 | "anchorPoint":"CENTER_BEGIN" | 140 | "anchorPoint":"CENTER_BEGIN" |
| 140 | - } | 141 | + }, |
| 142 | + "depthIndex":1 | ||
| 141 | }, | 143 | }, |
| 142 | 144 | ||
| 143 | "labelVisual":{ | 145 | "labelVisual":{ |
| @@ -147,14 +149,15 @@ | @@ -147,14 +149,15 @@ | ||
| 147 | "horizontalAlignment":"END", | 149 | "horizontalAlignment":"END", |
| 148 | "verticalAlignment":"CENTER", | 150 | "verticalAlignment":"CENTER", |
| 149 | "textColor":[1,1,1,1], | 151 | "textColor":[1,1,1,1], |
| 150 | - "mixColor":[0, 0, 0, 1], | 152 | + "mixColor":[0,0,0,1], |
| 151 | "transform":{ | 153 | "transform":{ |
| 152 | "size":[0.9, 0.9], | 154 | "size":[0.9, 0.9], |
| 153 | "offset":[-30,0], | 155 | "offset":[-30,0], |
| 154 | "offsetSizeMode":[1,1,0,0], | 156 | "offsetSizeMode":[1,1,0,0], |
| 155 | "origin":"CENTER_END", | 157 | "origin":"CENTER_END", |
| 156 | "anchorPoint":"CENTER_END" | 158 | "anchorPoint":"CENTER_END" |
| 157 | - } | 159 | + }, |
| 160 | + "depthIndex":1 | ||
| 158 | } | 161 | } |
| 159 | }, | 162 | }, |
| 160 | 163 | ||
| @@ -168,12 +171,13 @@ | @@ -168,12 +171,13 @@ | ||
| 168 | "visualType":"IMAGE", | 171 | "visualType":"IMAGE", |
| 169 | "url":"{STYLE_DIR}/images/Tick.png", | 172 | "url":"{STYLE_DIR}/images/Tick.png", |
| 170 | "transform":{ | 173 | "transform":{ |
| 171 | - "size":[0.09, 0.28], | 174 | + "size":[0.12, 0.37], |
| 172 | "offset":[30,0], | 175 | "offset":[30,0], |
| 173 | "offsetSizeMode":[1,1,0,0], | 176 | "offsetSizeMode":[1,1,0,0], |
| 174 | "origin":"CENTER_BEGIN", | 177 | "origin":"CENTER_BEGIN", |
| 175 | "anchorPoint":"CENTER_BEGIN" | 178 | "anchorPoint":"CENTER_BEGIN" |
| 176 | - } | 179 | + }, |
| 180 | + "depthIndex":2 | ||
| 177 | } | 181 | } |
| 178 | }, | 182 | }, |
| 179 | "entryTransition": | 183 | "entryTransition": |
| @@ -261,7 +265,8 @@ | @@ -261,7 +265,8 @@ | ||
| 261 | "offsetSizeMode":[1,1,0,0], | 265 | "offsetSizeMode":[1,1,0,0], |
| 262 | "origin":"CENTER_BEGIN", | 266 | "origin":"CENTER_BEGIN", |
| 263 | "anchorPoint":"CENTER_BEGIN" | 267 | "anchorPoint":"CENTER_BEGIN" |
| 264 | - } | 268 | + }, |
| 269 | + "depthIndex":0 | ||
| 265 | }, | 270 | }, |
| 266 | 271 | ||
| 267 | "checkboxFgVisual":{ | 272 | "checkboxFgVisual":{ |
| @@ -273,7 +278,8 @@ | @@ -273,7 +278,8 @@ | ||
| 273 | "offsetSizeMode":[1,1,0,0], | 278 | "offsetSizeMode":[1,1,0,0], |
| 274 | "origin":"CENTER_BEGIN", | 279 | "origin":"CENTER_BEGIN", |
| 275 | "anchorPoint":"CENTER_BEGIN" | 280 | "anchorPoint":"CENTER_BEGIN" |
| 276 | - } | 281 | + }, |
| 282 | + "depthIndex":1 | ||
| 277 | }, | 283 | }, |
| 278 | 284 | ||
| 279 | "labelVisual":{ | 285 | "labelVisual":{ |
| @@ -290,7 +296,32 @@ | @@ -290,7 +296,32 @@ | ||
| 290 | "offsetSizeMode":[1,1,0,0], | 296 | "offsetSizeMode":[1,1,0,0], |
| 291 | "origin":"CENTER_END", | 297 | "origin":"CENTER_END", |
| 292 | "anchorPoint":"CENTER_END" | 298 | "anchorPoint":"CENTER_END" |
| 299 | + }, | ||
| 300 | + "depthIndex":1 | ||
| 301 | + } | ||
| 302 | + }, | ||
| 303 | + "states": | ||
| 304 | + { | ||
| 305 | + "CHECKED": | ||
| 306 | + { | ||
| 307 | + "visuals": | ||
| 308 | + { | ||
| 309 | + "checkboxFgVisual":{ | ||
| 310 | + "visualType":"IMAGE", | ||
| 311 | + "url":"{STYLE_DIR}/images/Tick.png", | ||
| 312 | + "transform":{ | ||
| 313 | + "size":[0.09, 0.28], | ||
| 314 | + "offset":[30,0], | ||
| 315 | + "offsetSizeMode":[1,1,0,0], | ||
| 316 | + "origin":"CENTER_BEGIN", | ||
| 317 | + "anchorPoint":"CENTER_BEGIN" | ||
| 318 | + }, | ||
| 319 | + "depthIndex":2 | ||
| 320 | + } | ||
| 293 | } | 321 | } |
| 322 | + }, | ||
| 323 | + "UNCHECKED": | ||
| 324 | + { | ||
| 294 | } | 325 | } |
| 295 | } | 326 | } |
| 296 | } | 327 | } |
| @@ -312,6 +343,7 @@ | @@ -312,6 +343,7 @@ | ||
| 312 | "from":"DISABLED", | 343 | "from":"DISABLED", |
| 313 | "to":"NORMAL", | 344 | "to":"NORMAL", |
| 314 | "visualName":"*", | 345 | "visualName":"*", |
| 346 | + "effect":"CROSSFADE", | ||
| 315 | "animator": | 347 | "animator": |
| 316 | { | 348 | { |
| 317 | "alphaFunction":"EASE_OUT_BACK", | 349 | "alphaFunction":"EASE_OUT_BACK", |
| @@ -333,6 +365,7 @@ | @@ -333,6 +365,7 @@ | ||
| 333 | "from":"NORMAL", | 365 | "from":"NORMAL", |
| 334 | "to":"DISABLED", | 366 | "to":"DISABLED", |
| 335 | "visualName":"*", | 367 | "visualName":"*", |
| 368 | + "effect":"CROSSFADE", | ||
| 336 | "animator": | 369 | "animator": |
| 337 | { | 370 | { |
| 338 | "alphaFunction":"EASE_OUT_BACK", | 371 | "alphaFunction":"EASE_OUT_BACK", |
resources/style/style-example-theme-one.json.in
| @@ -125,19 +125,21 @@ | @@ -125,19 +125,21 @@ | ||
| 125 | { | 125 | { |
| 126 | "backgroundVisual":{ | 126 | "backgroundVisual":{ |
| 127 | "visualType":"IMAGE", | 127 | "visualType":"IMAGE", |
| 128 | - "url":"{STYLE_DIR}/images/shadowButtonBg.9.png" | 128 | + "url":"{STYLE_DIR}/images/shadowButtonBg.9.png", |
| 129 | + "depthIndex":0 | ||
| 129 | }, | 130 | }, |
| 130 | 131 | ||
| 131 | "checkboxBgVisual":{ | 132 | "checkboxBgVisual":{ |
| 132 | "visualType":"IMAGE", | 133 | "visualType":"IMAGE", |
| 133 | "url":"{STYLE_DIR}/images/CheckBg.png", | 134 | "url":"{STYLE_DIR}/images/CheckBg.png", |
| 134 | "transform":{ | 135 | "transform":{ |
| 135 | - "size":[0.09, 0.28], | 136 | + "size":[0.12, 0.37], |
| 136 | "offset":[30,0], | 137 | "offset":[30,0], |
| 137 | "offsetSizeMode":[1,1,0,0], | 138 | "offsetSizeMode":[1,1,0,0], |
| 138 | "origin":"CENTER_BEGIN", | 139 | "origin":"CENTER_BEGIN", |
| 139 | "anchorPoint":"CENTER_BEGIN" | 140 | "anchorPoint":"CENTER_BEGIN" |
| 140 | - } | 141 | + }, |
| 142 | + "depthIndex":1 | ||
| 141 | }, | 143 | }, |
| 142 | 144 | ||
| 143 | "labelVisual":{ | 145 | "labelVisual":{ |
| @@ -147,14 +149,15 @@ | @@ -147,14 +149,15 @@ | ||
| 147 | "horizontalAlignment":"END", | 149 | "horizontalAlignment":"END", |
| 148 | "verticalAlignment":"CENTER", | 150 | "verticalAlignment":"CENTER", |
| 149 | "textColor":[1,1,1,1], | 151 | "textColor":[1,1,1,1], |
| 150 | - "mixColor":[0, 0, 0, 1], | 152 | + "mixColor":[0,0,0,1], |
| 151 | "transform":{ | 153 | "transform":{ |
| 152 | "size":[0.9, 0.9], | 154 | "size":[0.9, 0.9], |
| 153 | "offset":[-30,0], | 155 | "offset":[-30,0], |
| 154 | "offsetSizeMode":[1,1,0,0], | 156 | "offsetSizeMode":[1,1,0,0], |
| 155 | "origin":"CENTER_END", | 157 | "origin":"CENTER_END", |
| 156 | "anchorPoint":"CENTER_END" | 158 | "anchorPoint":"CENTER_END" |
| 157 | - } | 159 | + }, |
| 160 | + "depthIndex":1 | ||
| 158 | } | 161 | } |
| 159 | }, | 162 | }, |
| 160 | 163 | ||
| @@ -168,12 +171,13 @@ | @@ -168,12 +171,13 @@ | ||
| 168 | "visualType":"IMAGE", | 171 | "visualType":"IMAGE", |
| 169 | "url":"{STYLE_DIR}/images/Tick.png", | 172 | "url":"{STYLE_DIR}/images/Tick.png", |
| 170 | "transform":{ | 173 | "transform":{ |
| 171 | - "size":[0.09, 0.28], | 174 | + "size":[0.12, 0.37], |
| 172 | "offset":[30,0], | 175 | "offset":[30,0], |
| 173 | "offsetSizeMode":[1,1,0,0], | 176 | "offsetSizeMode":[1,1,0,0], |
| 174 | "origin":"CENTER_BEGIN", | 177 | "origin":"CENTER_BEGIN", |
| 175 | "anchorPoint":"CENTER_BEGIN" | 178 | "anchorPoint":"CENTER_BEGIN" |
| 176 | - } | 179 | + }, |
| 180 | + "depthIndex":2 | ||
| 177 | } | 181 | } |
| 178 | }, | 182 | }, |
| 179 | "entryTransition": | 183 | "entryTransition": |
| @@ -261,7 +265,8 @@ | @@ -261,7 +265,8 @@ | ||
| 261 | "offsetSizeMode":[1,1,0,0], | 265 | "offsetSizeMode":[1,1,0,0], |
| 262 | "origin":"CENTER_BEGIN", | 266 | "origin":"CENTER_BEGIN", |
| 263 | "anchorPoint":"CENTER_BEGIN" | 267 | "anchorPoint":"CENTER_BEGIN" |
| 264 | - } | 268 | + }, |
| 269 | + "depthIndex":0 | ||
| 265 | }, | 270 | }, |
| 266 | 271 | ||
| 267 | "checkboxFgVisual":{ | 272 | "checkboxFgVisual":{ |
| @@ -273,7 +278,8 @@ | @@ -273,7 +278,8 @@ | ||
| 273 | "offsetSizeMode":[1,1,0,0], | 278 | "offsetSizeMode":[1,1,0,0], |
| 274 | "origin":"CENTER_BEGIN", | 279 | "origin":"CENTER_BEGIN", |
| 275 | "anchorPoint":"CENTER_BEGIN" | 280 | "anchorPoint":"CENTER_BEGIN" |
| 276 | - } | 281 | + }, |
| 282 | + "depthIndex":1 | ||
| 277 | }, | 283 | }, |
| 278 | 284 | ||
| 279 | "labelVisual":{ | 285 | "labelVisual":{ |
| @@ -290,7 +296,32 @@ | @@ -290,7 +296,32 @@ | ||
| 290 | "offsetSizeMode":[1,1,0,0], | 296 | "offsetSizeMode":[1,1,0,0], |
| 291 | "origin":"CENTER_END", | 297 | "origin":"CENTER_END", |
| 292 | "anchorPoint":"CENTER_END" | 298 | "anchorPoint":"CENTER_END" |
| 299 | + }, | ||
| 300 | + "depthIndex":1 | ||
| 301 | + } | ||
| 302 | + }, | ||
| 303 | + "states": | ||
| 304 | + { | ||
| 305 | + "CHECKED": | ||
| 306 | + { | ||
| 307 | + "visuals": | ||
| 308 | + { | ||
| 309 | + "checkboxFgVisual":{ | ||
| 310 | + "visualType":"IMAGE", | ||
| 311 | + "url":"{STYLE_DIR}/images/Tick.png", | ||
| 312 | + "transform":{ | ||
| 313 | + "size":[0.09, 0.28], | ||
| 314 | + "offset":[30,0], | ||
| 315 | + "offsetSizeMode":[1,1,0,0], | ||
| 316 | + "origin":"CENTER_BEGIN", | ||
| 317 | + "anchorPoint":"CENTER_BEGIN" | ||
| 318 | + }, | ||
| 319 | + "depthIndex":2 | ||
| 320 | + } | ||
| 293 | } | 321 | } |
| 322 | + }, | ||
| 323 | + "UNCHECKED": | ||
| 324 | + { | ||
| 294 | } | 325 | } |
| 295 | } | 326 | } |
| 296 | } | 327 | } |
| @@ -312,6 +343,7 @@ | @@ -312,6 +343,7 @@ | ||
| 312 | "from":"DISABLED", | 343 | "from":"DISABLED", |
| 313 | "to":"NORMAL", | 344 | "to":"NORMAL", |
| 314 | "visualName":"*", | 345 | "visualName":"*", |
| 346 | + "effect":"CROSSFADE", | ||
| 315 | "animator": | 347 | "animator": |
| 316 | { | 348 | { |
| 317 | "alphaFunction":"EASE_OUT_BACK", | 349 | "alphaFunction":"EASE_OUT_BACK", |
| @@ -333,6 +365,7 @@ | @@ -333,6 +365,7 @@ | ||
| 333 | "from":"NORMAL", | 365 | "from":"NORMAL", |
| 334 | "to":"DISABLED", | 366 | "to":"DISABLED", |
| 335 | "visualName":"*", | 367 | "visualName":"*", |
| 368 | + "effect":"CROSSFADE", | ||
| 336 | "animator": | 369 | "animator": |
| 337 | { | 370 | { |
| 338 | "alphaFunction":"EASE_OUT_BACK", | 371 | "alphaFunction":"EASE_OUT_BACK", |
shared/dali-demo-strings.h
| @@ -65,6 +65,7 @@ extern "C" | @@ -65,6 +65,7 @@ extern "C" | ||
| 65 | #define DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE") | 65 | #define DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE") |
| 66 | #define DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE") | 66 | #define DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE") |
| 67 | #define DALI_DEMO_STR_TITLE_POPUP dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_POPUP") | 67 | #define DALI_DEMO_STR_TITLE_POPUP dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_POPUP") |
| 68 | +#define DALI_DEMO_STR_TITLE_PIVOT dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_PIVOT") | ||
| 68 | #define DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES") | 69 | #define DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES") |
| 69 | #define DALI_DEMO_STR_TITLE_PROGRESS_BAR dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_PROGRESS_BAR") | 70 | #define DALI_DEMO_STR_TITLE_PROGRESS_BAR dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_PROGRESS_BAR") |
| 70 | #define DALI_DEMO_STR_TITLE_RENDERING_DRAW_LINE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_RENDERING_DRAW_LINE") | 71 | #define DALI_DEMO_STR_TITLE_RENDERING_DRAW_LINE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_RENDERING_DRAW_LINE") |
| @@ -123,6 +124,7 @@ extern "C" | @@ -123,6 +124,7 @@ extern "C" | ||
| 123 | #define DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE "Native Image Source" | 124 | #define DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE "Native Image Source" |
| 124 | #define DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE "Negotiate Size" | 125 | #define DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE "Negotiate Size" |
| 125 | #define DALI_DEMO_STR_TITLE_POPUP "Popup" | 126 | #define DALI_DEMO_STR_TITLE_POPUP "Popup" |
| 127 | +#define DALI_DEMO_STR_TITLE_PIVOT "Pivot" | ||
| 126 | #define DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES "Primitive Shapes" | 128 | #define DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES "Primitive Shapes" |
| 127 | #define DALI_DEMO_STR_TITLE_PROGRESS_BAR "Progress Bar" | 129 | #define DALI_DEMO_STR_TITLE_PROGRESS_BAR "Progress Bar" |
| 128 | #define DALI_DEMO_STR_TITLE_RENDERING_DRAW_LINE "Draw Line" | 130 | #define DALI_DEMO_STR_TITLE_RENDERING_DRAW_LINE "Draw Line" |