Commit af1beb04feb7468c3e28b34ad5a5bcf954197df2

Authored by Ferran Sole
2 parents 0fd8cce1 856f098b

[dali_1.0.30] Merge branch 'tizen'

Change-Id: I873e73f33acfd8ec6562610bbc2e6f5b81e522c4
demo/images/checkbox-checked.png renamed to demo/images/checkbox-selected.png

1.94 KB

demo/images/checkbox-unchecked.png renamed to demo/images/checkbox-unselected.png

629 Bytes

demo/scripts/button.json
... ... @@ -32,7 +32,7 @@
32 32 "filename": "{DALI_IMAGE_DIR}blocks-brick-1.png"
33 33 }
34 34 },
35   - "pressed-state-actor": {
  35 + "selected-state-actor": {
36 36 "type": "ImageActor",
37 37 "image": {
38 38 "filename": "{DALI_IMAGE_DIR}blocks-brick-2.png"
... ... @@ -53,22 +53,22 @@
53 53 "size": [0, 200, 0],
54 54 "label-actor": {
55 55 "type": "TextView",
56   - "text": "Dimmed"
  56 + "text": "Disabled"
57 57 },
58   - "dimmed": true,
  58 + "disabled": true,
59 59 "normal-state-actor": {
60 60 "type": "ImageActor",
61 61 "image": {
62 62 "filename": "{DALI_IMAGE_DIR}blocks-brick-1.png"
63 63 }
64 64 },
65   - "pressed-state-actor": {
  65 + "selected-state-actor": {
66 66 "type": "ImageActor",
67 67 "image": {
68 68 "filename": "{DALI_IMAGE_DIR}blocks-brick-2.png"
69 69 }
70 70 },
71   - "dimmed-state-actor": {
  71 + "disabled-state-actor": {
72 72 "type": "ImageActor",
73 73 "image": {
74 74 "filename": "{DALI_IMAGE_DIR}blocks-brick-3.png"
... ... @@ -97,7 +97,7 @@
97 97 "filename": "{DALI_IMAGE_DIR}blocks-brick-1.png"
98 98 }
99 99 },
100   - "pressed-state-actor": {
  100 + "selected-state-actor": {
101 101 "type": "ImageActor",
102 102 "style": "STYLE_NINE_PATCH",
103 103 "border": [26, 24, 26, 23],
... ... @@ -106,7 +106,7 @@
106 106 }
107 107 },
108 108 "signals": [{
109   - "name": "toggled",
  109 + "name": "selected",
110 110 "action": "set",
111 111 "actor": "toggle-button",
112 112 "property": "label-actor",
... ...
demo/scripts/super-blur-view.json
... ... @@ -78,7 +78,7 @@
78 78 "filename": "{DALI_IMAGE_DIR}button-background.png"
79 79 }
80 80 },
81   - "pressed-state-actor": {
  81 + "selected-state-actor": {
82 82 "type": "ImageActor",
83 83 "style": "STYLE_NINE_PATCH",
84 84 "border": [26, 24, 26, 23],
... ...
examples/buttons/buttons-example.cpp
... ... @@ -61,8 +61,8 @@ const char* const PUSHBUTTON_PRESS_IMAGE = DALI_IMAGE_DIR "button-down.9.png";
61 61 const char* const PUSHBUTTON_DISABLED_IMAGE = DALI_IMAGE_DIR "button-disabled.9.png";
62 62 const char* const PUSHBUTTON_BUTTON_IMAGE = DALI_IMAGE_DIR "button-up.9.png";
63 63  
64   -const char* const CHECKBOX_UNCHECKED_IMAGE = DALI_IMAGE_DIR "checkbox-unchecked.png";
65   -const char* const CHECKBOX_CHECKED_IMAGE = DALI_IMAGE_DIR "checkbox-checked.png";
  64 +const char* const CHECKBOX_UNSELECTED_IMAGE = DALI_IMAGE_DIR "checkbox-unselected.png";
  65 +const char* const CHECKBOX_SELECTED_IMAGE = DALI_IMAGE_DIR "checkbox-selected.png";
66 66  
67 67 const Vector4 BACKGROUND_COLOUR( 1.0f, 1.0f, 1.0f, 0.15f );
68 68  
... ... @@ -251,7 +251,7 @@ class ButtonsController: public ConnectionTracker
251 251 radioButton.SetPosition( 0, 0 );
252 252 radioButton.SetSelected( true );
253 253  
254   - radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButtonToggle );
  254 + radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButton );
255 255  
256 256 radioButtonsGroup1.Add( radioButton );
257 257 }
... ... @@ -264,7 +264,7 @@ class ButtonsController: public ConnectionTracker
264 264 radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
265 265 radioButton.SetPosition( 0, DP(50) );
266 266  
267   - radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButtonToggle );
  267 + radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButton );
268 268  
269 269 radioButtonsGroup1.Add( radioButton );
270 270 }
... ... @@ -279,8 +279,8 @@ class ButtonsController: public ConnectionTracker
279 279 checkBoxBackground.SetSize( DP(430), DP(GROUP3_HEIGHT) );
280 280 mContentLayer.Add( checkBoxBackground );
281 281  
282   - Dali::Image unchecked = Dali::Image::New( CHECKBOX_UNCHECKED_IMAGE );
283   - Dali::Image checked = Dali::Image::New( CHECKBOX_CHECKED_IMAGE );
  282 + Dali::Image unselected = Dali::Image::New( CHECKBOX_UNSELECTED_IMAGE );
  283 + Dali::Image selected = Dali::Image::New( CHECKBOX_SELECTED_IMAGE );
284 284  
285 285 int checkYPos = MARGIN_SIZE;
286 286  
... ... @@ -290,15 +290,15 @@ class ButtonsController: public ConnectionTracker
290 290 checkBox.SetPosition( DP(MARGIN_SIZE), DP(checkYPos) );
291 291 checkBox.SetParentOrigin( ParentOrigin::TOP_LEFT );
292 292 checkBox.SetAnchorPoint( AnchorPoint::TOP_LEFT );
293   - checkBox.SetBackgroundImage( unchecked );
294   - checkBox.SetCheckedImage( checked );
  293 + checkBox.SetBackgroundImage( unselected );
  294 + checkBox.SetSelectedImage( selected );
295 295 checkBox.SetSize( DP(48), DP(48) );
296   - checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesToggled );
  296 + checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected );
297 297  
298 298 checkBoxBackground.Add( checkBox );
299 299 }
300 300  
301   - mCheckBox1State = Toolkit::TextView::New( "CheckBox1 is unchecked" );
  301 + mCheckBox1State = Toolkit::TextView::New( "CheckBox1 is unselected" );
302 302  
303 303 mCheckBox1State.SetAnchorPoint( AnchorPoint::TOP_LEFT );
304 304 mCheckBox1State.SetPosition( DP(80), DP(checkYPos) );
... ... @@ -312,16 +312,16 @@ class ButtonsController: public ConnectionTracker
312 312 checkBox.SetName( "checkbox2" );
313 313 checkBox.SetPosition( DP(MARGIN_SIZE), DP(checkYPos) );
314 314 checkBox.SetAnchorPoint( AnchorPoint::TOP_LEFT );
315   - checkBox.SetBackgroundImage( unchecked );
316   - checkBox.SetCheckedImage( checked );
  315 + checkBox.SetBackgroundImage( unselected );
  316 + checkBox.SetSelectedImage( selected );
317 317 checkBox.SetSize( DP(48), DP(48) );
318   - checkBox.SetChecked( true );
319   - checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesToggled );
  318 + checkBox.SetSelected( true );
  319 + checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected );
320 320  
321 321 checkBoxBackground.Add( checkBox );
322 322 }
323 323  
324   - mCheckBox2State = Toolkit::TextView::New( "CheckBox2 is checked" );
  324 + mCheckBox2State = Toolkit::TextView::New( "CheckBox2 is selected" );
325 325 mCheckBox2State.SetParentOrigin( ParentOrigin::TOP_LEFT );
326 326 mCheckBox2State.SetAnchorPoint( AnchorPoint::TOP_LEFT );
327 327 mCheckBox2State.SetPosition( DP(80), DP(checkYPos) );
... ... @@ -335,22 +335,22 @@ class ButtonsController: public ConnectionTracker
335 335 checkBox.SetName( "checkbox3" );
336 336 checkBox.SetPosition( DP(MARGIN_SIZE), DP(checkYPos) );
337 337 checkBox.SetAnchorPoint( AnchorPoint::TOP_LEFT );
338   - checkBox.SetBackgroundImage( unchecked );
339   - checkBox.SetCheckedImage( checked );
  338 + checkBox.SetBackgroundImage( unselected );
  339 + checkBox.SetSelectedImage( selected );
340 340 checkBox.SetSize( DP(48), DP(48) );
341   - checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesToggled );
  341 + checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected );
342 342  
343 343 checkBoxBackground.Add( checkBox );
344 344 }
345 345  
346   - mCheckBox3State = Toolkit::TextView::New( "CheckBox3 is unchecked" );
  346 + mCheckBox3State = Toolkit::TextView::New( "CheckBox3 is unselected" );
347 347  
348 348 mCheckBox3State.SetAnchorPoint( AnchorPoint::TOP_LEFT );
349 349 mCheckBox3State.SetPosition( DP(80), DP(checkYPos) );
350 350  
351 351 checkBoxBackground.Add( mCheckBox3State );
352 352  
353   - // Create toggle button
  353 + // Create togglabe button
354 354 yPos += GROUP3_HEIGHT + MARGIN_SIZE;
355 355  
356 356 Actor toggleBackground = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );
... ... @@ -361,18 +361,18 @@ class ButtonsController: public ConnectionTracker
361 361 mContentLayer.Add( toggleBackground );
362 362  
363 363 Toolkit::PushButton toggleButton = Toolkit::PushButton::New();
364   - toggleButton.SetToggleButton( true );
  364 + toggleButton.SetTogglableButton( true );
365 365 toggleButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
366 366 toggleButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
367 367 toggleButton.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) );
368   - toggleButton.SetLabel( "Toggle OFF" );
  368 + toggleButton.SetLabel( "Unselected" );
369 369 toggleButton.SetSize( DP(150), DP(BUTTON_HEIGHT) );
370 370  
371 371 toggleButton.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) );
372 372 toggleButton.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) );
373 373 toggleButton.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) );
374 374  
375   - toggleButton.StateChangedSignal().Connect( this, &ButtonsController::OnButtonToggled );
  375 + toggleButton.StateChangedSignal().Connect( this, &ButtonsController::OnButtonSelected );
376 376  
377 377 toggleBackground.Add( toggleButton );
378 378 }
... ... @@ -389,31 +389,31 @@ class ButtonsController: public ConnectionTracker
389 389 }
390 390 }
391 391  
392   - bool OnButtonToggled( Toolkit::Button button, bool state )
  392 + bool OnButtonSelected( Toolkit::Button button )
393 393 {
394 394 Toolkit::PushButton pushButton = Toolkit::PushButton::DownCast( button );
395 395 if( pushButton )
396 396 {
397   - if( state )
  397 + if( button.IsSelected() )
398 398 {
399   - pushButton.SetLabel( "Toggle ON" );
  399 + pushButton.SetLabel( "Selected" );
400 400 }
401 401 else
402 402 {
403   - pushButton.SetLabel( "Toggle OFF" );
  403 + pushButton.SetLabel( "Unselected" );
404 404 }
405 405 }
406 406  
407 407 return true;
408 408 }
409 409  
410   - bool EnableSelectButtonToggle( Toolkit::Button button, bool state )
  410 + bool EnableSelectButton( Toolkit::Button button )
411 411 {
412   - if( button.GetName() == "radio-select-enable" && state == true )
  412 + if( button.GetName() == "radio-select-enable" && button.IsSelected() == true )
413 413 {
414 414 mUpdateButton.SetDisabled( false );
415 415 }
416   - else if( button.GetName() == "radio-select-disable" && state == true )
  416 + else if( button.GetName() == "radio-select-disable" && button.IsSelected() == true )
417 417 {
418 418 mUpdateButton.SetDisabled( true );
419 419 }
... ... @@ -438,41 +438,41 @@ class ButtonsController: public ConnectionTracker
438 438 return true;
439 439 }
440 440  
441   - bool OnCheckBoxesToggled( Toolkit::Button button, bool state )
  441 + bool OnCheckBoxesSelected( Toolkit::Button button )
442 442 {
443 443 if( button.GetName() == "checkbox1" )
444 444 {
445   - if( state )
  445 + if( button.IsSelected() )
446 446 {
447   - mCheckBox1State.SetText("CheckBox1 is checked");
  447 + mCheckBox1State.SetText("CheckBox1 is selected");
448 448 }
449 449 else
450 450 {
451   - mCheckBox1State.SetText("CheckBox1 is unchecked");
  451 + mCheckBox1State.SetText("CheckBox1 is unselected");
452 452 }
453 453 }
454 454  
455 455 if( button.GetName() == "checkbox2" )
456 456 {
457   - if( state )
  457 + if( button.IsSelected() )
458 458 {
459   - mCheckBox2State.SetText("CheckBox2 is checked");
  459 + mCheckBox2State.SetText("CheckBox2 is selected");
460 460 }
461 461 else
462 462 {
463   - mCheckBox2State.SetText("CheckBox2 is unchecked");
  463 + mCheckBox2State.SetText("CheckBox2 is unselected");
464 464 }
465 465 }
466 466  
467 467 if( button.GetName() == "checkbox3" )
468 468 {
469   - if( state )
  469 + if( button.IsSelected() )
470 470 {
471   - mCheckBox3State.SetText("CheckBox3 is checked");
  471 + mCheckBox3State.SetText("CheckBox3 is selected");
472 472 }
473 473 else
474 474 {
475   - mCheckBox3State.SetText("CheckBox3 is unchecked");
  475 + mCheckBox3State.SetText("CheckBox3 is unselected");
476 476 }
477 477 }
478 478  
... ...
examples/cluster/cluster-example.cpp
... ... @@ -226,27 +226,6 @@ struct RescaleConstraint
226 226 };
227 227  
228 228 /**
229   - * ClusterImageBorderSizeConstraint
230   - */
231   -struct ClusterImageBorderSizeConstraint
232   -{
233   - ClusterImageBorderSizeConstraint()
234   - : mSizeOffset(Vector3(CLUSTER_IMAGE_BORDER_INDENT - 1, CLUSTER_IMAGE_BORDER_INDENT - 1, 0.0f) * 2.0f)
235   - {
236   - }
237   -
238   - Vector3 operator()(const Vector3& current,
239   - const PropertyInput& referenceSizeProperty)
240   - {
241   - const Vector3& referenceSize = referenceSizeProperty.GetVector3();
242   -
243   - return referenceSize + mSizeOffset;
244   - }
245   -
246   - Vector3 mSizeOffset; ///< The amount to offset the size from referenceSize
247   -};
248   -
249   -/**
250 229 * ShearEffectConstraint
251 230 *
252 231 * Constrains ShearEffect's tilt to be a function of scrollview's
... ... @@ -620,32 +599,29 @@ public:
620 599 shadowActor.SetAnchorPoint(AnchorPoint::CENTER);
621 600 shadowActor.SetPosition(Vector3(0.0f, 0.0f, -1.0f));
622 601  
623   - // Apply size constraint to the image shadow
624   - shadowActor.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint( ShadowProperty::SIZE_SCALE ) ) );
625   - actor.Add(shadowActor);
  602 + // Apply size-relative mode to auto-size the image shadow
  603 + shadowActor.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
  604 + shadowActor.SetSizeModeFactor( ShadowProperty::SIZE_SCALE );
  605 + actor.Add( shadowActor );
626 606  
627   - // Add a picture image actor to actor.
  607 + // Add a picture image actor to actor (with equal size to the parent).
628 608 Image image = Image::New( imagePath, attribs );
629   - ImageActor imageActor = ImageActor::New(image);
  609 + ImageActor imageActor = ImageActor::New( image );
630 610 imageActor.SetParentOrigin( ParentOrigin::CENTER );
631 611 imageActor.SetAnchorPoint( AnchorPoint::CENTER );
632   - imageActor.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
633   - actor.Add(imageActor);
  612 + imageActor.SetSizeMode( SIZE_EQUAL_TO_PARENT );
  613 + actor.Add( imageActor );
634 614  
635   - // Add a border image child actor
636   - ImageActor borderActor = ImageActor::New(mClusterBorderImage);
  615 + // Add a border image child actor (with a fixed size offset from parent).
  616 + ImageActor borderActor = ImageActor::New( mClusterBorderImage );
637 617 borderActor.SetParentOrigin( ParentOrigin::CENTER );
638 618 borderActor.SetAnchorPoint( AnchorPoint::CENTER );
639 619 borderActor.SetStyle( ImageActor::STYLE_NINE_PATCH );
640 620 borderActor.SetNinePatchBorder( CLUSTER_IMAGE_BORDER_ABSOLUTE );
641   - borderActor.SetPosition(Vector3(0.0f, 0.0f, 1.0f));
642   -
643   - // Apply size constraint to the image border
644   - Constraint constraint = Constraint::New<Vector3>(Actor::SIZE,
645   - ParentSource(Actor::SIZE),
646   - ClusterImageBorderSizeConstraint());
647   - borderActor.ApplyConstraint(constraint);
648   - actor.Add(borderActor);
  621 + borderActor.SetPosition( Vector3( 0.0f, 0.0f, 1.0f ) );
  622 + borderActor.SetSizeMode( SIZE_FIXED_OFFSET_FROM_PARENT );
  623 + borderActor.SetSizeModeFactor( Vector3( CLUSTER_IMAGE_BORDER_INDENT - 1.0f, CLUSTER_IMAGE_BORDER_INDENT - 1.0f, 0.0f ) * 2.0f );
  624 + actor.Add( borderActor );
649 625  
650 626 return actor;
651 627 }
... ...
examples/logging/logging-example.cpp
... ... @@ -554,17 +554,17 @@ class LoggingController: public ConnectionTracker
554 554 }
555 555 }
556 556  
557   - bool LoggingRadioSelect( Toolkit::Button button, bool state )
  557 + bool LoggingRadioSelect( Toolkit::Button button )
558 558 {
559   - if( button.GetName() == LOGGER_1_RADIO_ID && state == true )
  559 + if( button.GetName() == LOGGER_1_RADIO_ID && button.IsSelected() == true )
560 560 {
561 561 mCurrentLogger = 0;
562 562 }
563   - else if( button.GetName() == LOGGER_2_RADIO_ID && state == true )
  563 + else if( button.GetName() == LOGGER_2_RADIO_ID && button.IsSelected() == true )
564 564 {
565 565 mCurrentLogger = 1;
566 566 }
567   - else if( button.GetName() == LOGGER_3_RADIO_ID && state == true )
  567 + else if( button.GetName() == LOGGER_3_RADIO_ID && button.IsSelected() == true )
568 568 {
569 569 mCurrentLogger = 2;
570 570 }
... ... @@ -592,9 +592,9 @@ class LoggingController: public ConnectionTracker
592 592 }
593 593 }
594 594  
595   - bool FrequencyRadioSelect( Toolkit::Button button, bool state )
  595 + bool FrequencyRadioSelect( Toolkit::Button button )
596 596 {
597   - if( button.GetName() == FREQUENCY_1_RADIO_ID && state == true )
  597 + if( button.GetName() == FREQUENCY_1_RADIO_ID && button.IsSelected() == true )
598 598 {
599 599 if( mPerformanceLoggers[mCurrentLogger] )
600 600 {
... ... @@ -605,7 +605,7 @@ class LoggingController: public ConnectionTracker
605 605 mLoggerStates[mCurrentLogger].frequency = HIGH_FREQUENCY;
606 606 }
607 607 }
608   - else if( button.GetName() == FREQUENCY_2_RADIO_ID && state == true )
  608 + else if( button.GetName() == FREQUENCY_2_RADIO_ID && button.IsSelected() == true )
609 609 {
610 610 if( mPerformanceLoggers[mCurrentLogger] )
611 611 {
... ... @@ -616,7 +616,7 @@ class LoggingController: public ConnectionTracker
616 616 mLoggerStates[mCurrentLogger].frequency = MEDIUM_FREQUENCY;
617 617 }
618 618 }
619   - else if( button.GetName() == FREQUENCY_3_RADIO_ID && state == true )
  619 + else if( button.GetName() == FREQUENCY_3_RADIO_ID && button.IsSelected() == true )
620 620 {
621 621 if( mPerformanceLoggers[mCurrentLogger] )
622 622 {
... ...
packaging/com.samsung.dali-demo.spec
... ... @@ -2,7 +2,7 @@
2 2  
3 3 Name: com.samsung.dali-demo
4 4 Summary: The OpenGLES Canvas Core Demo
5   -Version: 1.0.29
  5 +Version: 1.0.30
6 6 Release: 1
7 7 Group: System/Libraries
8 8 License: Apache-2.0
... ...