Commit ee35102ced098adb56cb19a9fc0e2da831807d8e
[dali_1.0.49] Merge branch 'devel/master'
Change-Id: Ieaa69fde05176af58de6161fdce4b9dd80fd5ffb
Showing
20 changed files
with
66 additions
and
55 deletions
examples/cluster/cluster-example.cpp
| ... | ... | @@ -456,8 +456,8 @@ public: |
| 456 | 456 | // fitting it inside a quarter of the stage area with the conservative BOX |
| 457 | 457 | // filter mode: |
| 458 | 458 | Image bg = ResourceImage::New( CLUSTER_BACKGROUND_IMAGE_PATH, Dali::ImageDimensions( stageSize.x * 0.5f, stageSize.y * 0.5f ), Dali::FittingMode::SHRINK_TO_FIT, Dali::SamplingMode::BOX ); |
| 459 | - ImageActor image = ImageActor::New(bg); | |
| 460 | - clusterActor.SetBackgroundImage(image); | |
| 459 | + Control clusterControl = Control::DownCast( clusterActor ); | |
| 460 | + clusterControl.SetBackgroundImage( bg ); | |
| 461 | 461 | |
| 462 | 462 | // Add actors (pictures) as the children of the cluster |
| 463 | 463 | for (unsigned int i = 0; (i < style.GetMaximumNumberOfChildren()) && (*paths); i++, paths++) | ... | ... |
examples/cluster/cluster-impl.cpp
| ... | ... | @@ -374,23 +374,6 @@ void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimeP |
| 374 | 374 | } |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | -void Cluster::SetBackgroundImage( Actor image ) | |
| 378 | -{ | |
| 379 | - // Replaces the background image. | |
| 380 | - if(mBackgroundImage && mBackgroundImage.GetParent()) | |
| 381 | - { | |
| 382 | - mBackgroundImage.GetParent().Remove(mBackgroundImage); | |
| 383 | - } | |
| 384 | - | |
| 385 | - mBackgroundImage = image; | |
| 386 | - Self().Add(mBackgroundImage); | |
| 387 | - | |
| 388 | - mBackgroundImage.SetAnchorPoint( AnchorPoint::TOP_LEFT ); | |
| 389 | - mBackgroundImage.SetParentOrigin( ParentOrigin::TOP_LEFT ); | |
| 390 | - | |
| 391 | - UpdateBackground(0.0f); | |
| 392 | -} | |
| 393 | - | |
| 394 | 377 | void Cluster::SetTitle( Actor text ) |
| 395 | 378 | { |
| 396 | 379 | // Replaces the title actor. | ... | ... |
examples/cluster/cluster-impl.h
| ... | ... | @@ -156,11 +156,6 @@ public: |
| 156 | 156 | void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front ); |
| 157 | 157 | |
| 158 | 158 | /** |
| 159 | - * @copydoc Demo::Cluster::SetBackgroundImage | |
| 160 | - */ | |
| 161 | - void SetBackgroundImage( Actor image ); | |
| 162 | - | |
| 163 | - /** | |
| 164 | 159 | * @copydoc Demo::Cluster::SetTitle |
| 165 | 160 | */ |
| 166 | 161 | void SetTitle( Actor text ); | ... | ... |
examples/cluster/cluster.cpp
| ... | ... | @@ -127,11 +127,6 @@ void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimeP |
| 127 | 127 | GetImpl(*this).RestoreChild( index, alpha, period, front ); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | -void Cluster::SetBackgroundImage( Actor image ) | |
| 131 | -{ | |
| 132 | - GetImpl(*this).SetBackgroundImage(image); | |
| 133 | -} | |
| 134 | - | |
| 135 | 130 | void Cluster::SetTitle( Actor text ) |
| 136 | 131 | { |
| 137 | 132 | GetImpl(*this).SetTitle(text); | ... | ... |
examples/cluster/cluster.h
| ... | ... | @@ -206,12 +206,6 @@ public: |
| 206 | 206 | void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front = false ); |
| 207 | 207 | |
| 208 | 208 | /** |
| 209 | - * Sets the background image. | |
| 210 | - * @param[in] image The background image. | |
| 211 | - */ | |
| 212 | - void SetBackgroundImage( Actor image ); | |
| 213 | - | |
| 214 | - /** | |
| 215 | 209 | * Sets the title. |
| 216 | 210 | * |
| 217 | 211 | * @param[in] text Title text. | ... | ... |
examples/cube-transition-effect/cube-transition-effect-example.cpp
| ... | ... | @@ -238,6 +238,7 @@ void CubeTransitionApp::OnInit( Application& application ) |
| 238 | 238 | |
| 239 | 239 | // Creates a default view with a default tool bar, the view is added to the stage. |
| 240 | 240 | mContent = DemoHelper::CreateView( application, mView, mToolBar, "", TOOLBAR_IMAGE, "" ); |
| 241 | + mContent.SetBehavior( Layer::LAYER_3D ); | |
| 241 | 242 | |
| 242 | 243 | // Add an effect-changing button on the right of the tool bar. |
| 243 | 244 | mImageWave = ResourceImage::New( EFFECT_WAVE_IMAGE ); | ... | ... |
examples/item-view/item-view-example.cpp
| ... | ... | @@ -250,7 +250,7 @@ public: |
| 250 | 250 | mDeleteButton.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); |
| 251 | 251 | mDeleteButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); |
| 252 | 252 | mDeleteButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); |
| 253 | - mDeleteButton.SetDrawMode( DrawMode::OVERLAY ); | |
| 253 | + mDeleteButton.SetDrawMode( DrawMode::OVERLAY_2D ); | |
| 254 | 254 | mDeleteButton.SetButtonImage( ResourceImage::New( DELETE_IMAGE ) ); |
| 255 | 255 | mDeleteButton.SetSelectedImage( ResourceImage::New( DELETE_IMAGE_SELECTED ) ); |
| 256 | 256 | mDeleteButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); |
| ... | ... | @@ -265,7 +265,7 @@ public: |
| 265 | 265 | mInsertButton.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); |
| 266 | 266 | mInsertButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); |
| 267 | 267 | mInsertButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); |
| 268 | - mInsertButton.SetDrawMode( DrawMode::OVERLAY ); | |
| 268 | + mInsertButton.SetDrawMode( DrawMode::OVERLAY_2D ); | |
| 269 | 269 | mInsertButton.SetButtonImage( ResourceImage::New( INSERT_IMAGE ) ); |
| 270 | 270 | mInsertButton.SetSelectedImage( ResourceImage::New( INSERT_IMAGE_SELECTED ) ); |
| 271 | 271 | mInsertButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); |
| ... | ... | @@ -280,7 +280,7 @@ public: |
| 280 | 280 | mReplaceButton.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); |
| 281 | 281 | mReplaceButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); |
| 282 | 282 | mReplaceButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); |
| 283 | - mReplaceButton.SetDrawMode( DrawMode::OVERLAY ); | |
| 283 | + mReplaceButton.SetDrawMode( DrawMode::OVERLAY_2D ); | |
| 284 | 284 | mReplaceButton.SetButtonImage( ResourceImage::New( REPLACE_IMAGE ) ); |
| 285 | 285 | mReplaceButton.SetSelectedImage( ResourceImage::New( REPLACE_IMAGE_SELECTED ) ); |
| 286 | 286 | mReplaceButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) ); |
| ... | ... | @@ -298,6 +298,7 @@ public: |
| 298 | 298 | |
| 299 | 299 | // Display item view on the stage |
| 300 | 300 | stage.Add( mItemView ); |
| 301 | + stage.GetRootLayer().SetBehavior( Layer::LAYER_3D ); | |
| 301 | 302 | |
| 302 | 303 | // Create the layouts |
| 303 | 304 | mSpiralLayout = DefaultItemLayout::New( DefaultItemLayout::SPIRAL ); | ... | ... |
examples/line-mesh/line-mesh-example.cpp
| ... | ... | @@ -93,7 +93,7 @@ Geometry CreateGeometry() |
| 93 | 93 | // Create indices |
| 94 | 94 | unsigned int indexData[10] = { 0, 1, 1, 2, 2, 3, 3, 4, 4, 0 }; |
| 95 | 95 | Property::Map indexFormat; |
| 96 | - indexFormat["indices"] = Property::UNSIGNED_INTEGER; | |
| 96 | + indexFormat["indices"] = Property::INTEGER; | |
| 97 | 97 | PropertyBuffer indices = PropertyBuffer::New( indexFormat, sizeof(indexData)/sizeof(indexData[0]) ); |
| 98 | 98 | indices.SetData(indexData); |
| 99 | 99 | ... | ... |
examples/mesh-sorting/mesh-sorting-example.cpp
| ... | ... | @@ -104,7 +104,7 @@ Geometry CreateGeometry() |
| 104 | 104 | // Create indices |
| 105 | 105 | unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 }; |
| 106 | 106 | Property::Map indexFormat; |
| 107 | - indexFormat["indices"] = Property::UNSIGNED_INTEGER; | |
| 107 | + indexFormat["indices"] = Property::INTEGER; | |
| 108 | 108 | PropertyBuffer indices = PropertyBuffer::New( indexFormat, 6 ); |
| 109 | 109 | indices.SetData(indexData); |
| 110 | 110 | ... | ... |
examples/new-window/new-window-example.cpp
| ... | ... | @@ -441,7 +441,7 @@ Geometry NewWindowController::CreateMeshGeometry() |
| 441 | 441 | // Specify all the faces |
| 442 | 442 | unsigned int indexData[12] = { 0,1,3,0,2,4,0,3,4,0,2,1 }; |
| 443 | 443 | Property::Map indexFormat; |
| 444 | - indexFormat["indices"] = Property::UNSIGNED_INTEGER; | |
| 444 | + indexFormat["indices"] = Property::INTEGER; | |
| 445 | 445 | PropertyBuffer indices = PropertyBuffer::New( indexFormat, 12 ); |
| 446 | 446 | indices.SetData( indexData ); |
| 447 | 447 | ... | ... |
examples/radial-menu/radial-sweep-view-impl.cpp
| ... | ... | @@ -336,7 +336,7 @@ void RadialSweepViewImpl::CreateStencil( Radian initialSector ) |
| 336 | 336 | |
| 337 | 337 | unsigned int indexData[15] = { 0,1,2,0,2,3,0,3,4,0,4,5,0,5,6 }; |
| 338 | 338 | Property::Map indexFormat; |
| 339 | - indexFormat["indices"] = Property::UNSIGNED_INTEGER; | |
| 339 | + indexFormat["indices"] = Property::INTEGER; | |
| 340 | 340 | PropertyBuffer indices = PropertyBuffer::New( indexFormat, 15u ); |
| 341 | 341 | indices.SetData( indexData ); |
| 342 | 342 | ... | ... |
examples/text-field/text-field-example.cpp
| ... | ... | @@ -99,6 +99,9 @@ public: |
| 99 | 99 | Stage stage = Stage::GetCurrent(); |
| 100 | 100 | Vector2 stageSize = stage.GetSize(); |
| 101 | 101 | |
| 102 | + // Remove previously hidden pop-up | |
| 103 | + UnparentAndReset(mPopup); | |
| 104 | + | |
| 102 | 105 | // Launch a pop-up containing TextField |
| 103 | 106 | mField = CreateTextField( stageSize, mButtonLabel ); |
| 104 | 107 | mPopup = CreatePopup( stageSize.width * 0.8f ); |
| ... | ... | @@ -117,6 +120,7 @@ public: |
| 117 | 120 | field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); |
| 118 | 121 | field.SetProperty( TextField::Property::TEXT, text ); |
| 119 | 122 | field.SetProperty( TextField::Property::TEXT_COLOR, Vector4( 0.0f, 1.0f, 1.0f, 1.0f ) ); // CYAN |
| 123 | + field.SetProperty( TextField::Property::PRIMARY_CURSOR_COLOR, Color::WHITE ); | |
| 120 | 124 | field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Unnamed folder" ); |
| 121 | 125 | field.SetProperty( TextField::Property::PLACEHOLDER_TEXT_FOCUSED, "Enter folder name." ); |
| 122 | 126 | field.SetProperty( TextField::Property::DECORATION_BOUNDING_BOX, Rect<int>( BORDER_WIDTH, BORDER_WIDTH, stageSize.width - BORDER_WIDTH*2, stageSize.height - BORDER_WIDTH*2 ) ); |
| ... | ... | @@ -154,7 +158,6 @@ public: |
| 154 | 158 | mPopup.Hide(); |
| 155 | 159 | } |
| 156 | 160 | mField.Reset(); |
| 157 | - mPopup.Reset(); | |
| 158 | 161 | } |
| 159 | 162 | |
| 160 | 163 | bool OnPopupTouched( Actor actor, const TouchEvent& event ) | ... | ... |
examples/text-label/text-label-example.cpp
| ... | ... | @@ -107,7 +107,7 @@ public: |
| 107 | 107 | mContainer.SetParentOrigin( ParentOrigin::CENTER ); |
| 108 | 108 | mLayoutSize = Vector2(stageSize.width*0.6f, stageSize.width*0.6f); |
| 109 | 109 | mContainer.SetSize( mLayoutSize ); |
| 110 | - mContainer.SetDrawMode( DrawMode::OVERLAY ); | |
| 110 | + mContainer.SetDrawMode( DrawMode::OVERLAY_2D ); | |
| 111 | 111 | stage.Add( mContainer ); |
| 112 | 112 | |
| 113 | 113 | // Resize the center layout when the corner is grabbed | ... | ... |
examples/textured-mesh/textured-mesh-example.cpp
| ... | ... | @@ -81,7 +81,7 @@ Geometry CreateGeometry() |
| 81 | 81 | // Create indices |
| 82 | 82 | unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 }; |
| 83 | 83 | Property::Map indexFormat; |
| 84 | - indexFormat["indices"] = Property::UNSIGNED_INTEGER; | |
| 84 | + indexFormat["indices"] = Property::INTEGER; | |
| 85 | 85 | PropertyBuffer indices = PropertyBuffer::New( indexFormat, sizeof(indexData)/sizeof(indexData[0]) ); |
| 86 | 86 | indices.SetData(indexData); |
| 87 | 87 | ... | ... |
packaging/com.samsung.dali-demo.spec
resources/scripts/animated-colors.json
resources/scripts/background-color.json
resources/scripts/table-view.json
resources/style/demo-theme.json
| ... | ... | @@ -43,14 +43,33 @@ distributing this software or its derivatives. |
| 43 | 43 | { |
| 44 | 44 | "point-size":13 |
| 45 | 45 | }, |
| 46 | - | |
| 46 | + "textselectionpopuplabel": | |
| 47 | + { | |
| 48 | + "point-size":18 | |
| 49 | + }, | |
| 50 | + "textselectionpopup": | |
| 51 | + { | |
| 52 | + "popup-max-size":[400,100], | |
| 53 | + "option-divider-size":[2,0], | |
| 54 | + "popup-divider-color":[0.23,0.72,0.8,0.11], | |
| 55 | + "popup-icon-color":[1.0,1.0,1.0,1.0], | |
| 56 | + "popup-pressed-color":[0.24,0.72,0.8,0.11], | |
| 57 | + "background-image": { | |
| 58 | + "filename": "{DALI_IMAGE_DIR}selection-popup-bg.9.png" | |
| 59 | + } | |
| 60 | + }, | |
| 47 | 61 | "textfield": |
| 48 | 62 | { |
| 49 | 63 | "font-family":"HelveticaNeue", |
| 50 | 64 | "font-style":"Regular", |
| 51 | - "point-size":18 | |
| 65 | + "point-size":18, | |
| 66 | + "primary-cursor-color":[0.75,0.96,1.0,1.0], | |
| 67 | + "secondary-cursor-color":[1.0,0.71,0.9,1.0], | |
| 68 | + "selection-highlight-color":[0.75,0.96,1.0,1.0], | |
| 69 | + "grab-handle-image":"{DALI_IMAGE_DIR}cursor_handler_center.png", | |
| 70 | + "selection-handle-image-left":"{DALI_IMAGE_DIR}selection_handle_left.png", | |
| 71 | + "selection-handle-image-right":"{DALI_IMAGE_DIR}selection_handle_right.png" | |
| 52 | 72 | }, |
| 53 | - | |
| 54 | 73 | "scrollview": |
| 55 | 74 | { |
| 56 | 75 | "overshoot-effect-color":"B018" | ... | ... |
resources/style/mobile/demo-theme.json
| ... | ... | @@ -25,7 +25,8 @@ distributing this software or its derivatives. |
| 25 | 25 | "textlabel": |
| 26 | 26 | { |
| 27 | 27 | "font-family":"SamsungSans", |
| 28 | - "font-style":"Regular" | |
| 28 | + "font-style":"Regular", | |
| 29 | + "point-size":18 | |
| 29 | 30 | }, |
| 30 | 31 | |
| 31 | 32 | "textlabel-font-size-0": |
| ... | ... | @@ -63,11 +64,31 @@ distributing this software or its derivatives. |
| 63 | 64 | { |
| 64 | 65 | "point-size":10 |
| 65 | 66 | }, |
| 66 | - | |
| 67 | + "textselectionpopuplabel": | |
| 68 | + { | |
| 69 | + "point-size":8 | |
| 70 | + }, | |
| 71 | + "textselectionpopup": | |
| 72 | + { | |
| 73 | + "popup-max-size":[400,100], | |
| 74 | + "option-divider-size":[2,0], | |
| 75 | + "popup-divider-color":[0.23,0.72,0.8,0.11], | |
| 76 | + "popup-icon-color":[1.0,1.0,1.0,1.0], | |
| 77 | + "popup-pressed-color":[0.24,0.72,0.8,0.11], | |
| 78 | + "background-image": { | |
| 79 | + "filename": "{DALI_IMAGE_DIR}selection-popup-bg.9.png" | |
| 80 | + } | |
| 81 | + }, | |
| 67 | 82 | "textfield": |
| 68 | 83 | { |
| 69 | 84 | "font-family":"SamsungSans", |
| 70 | - "font-style":"Regular" | |
| 85 | + "font-style":"Regular", | |
| 86 | + "primary-cursor-color":[0.0,0.71,0.9,1.0], | |
| 87 | + "secondary-cursor-color":[0.0,0.71,0.9,1.0], | |
| 88 | + "selection-highlight-color":[0.75,0.96,1.0,1.0], | |
| 89 | + "grab-handle-image":"{DALI_IMAGE_DIR}cursor_handler_center.png", | |
| 90 | + "selection-handle-image-left":"{DALI_IMAGE_DIR}selection_handle_left.png", | |
| 91 | + "selection-handle-image-right":"{DALI_IMAGE_DIR}selection_handle_right.png" | |
| 71 | 92 | }, |
| 72 | 93 | |
| 73 | 94 | "textfield-font-size-0": | ... | ... |