diff --git a/demo/dali-table-view.cpp b/demo/dali-table-view.cpp index d0e095e..fb95d3f 100644 --- a/demo/dali-table-view.cpp +++ b/demo/dali-table-view.cpp @@ -53,10 +53,10 @@ const int MAX_PAGES = 256; ///< Maximum pag const int EXAMPLES_PER_ROW = 3; const int ROWS_PER_PAGE = 3; const int EXAMPLES_PER_PAGE = EXAMPLES_PER_ROW * ROWS_PER_PAGE; -const int BOTTOM_PADDING_HEIGHT = 40; -const int LOGO_MARGIN = 50; +const float LOGO_MARGIN_RATIO = 0.5f / 0.9f; +const float BOTTOM_PADDING_RATIO = 0.4f / 0.9f; const Vector3 SCROLLVIEW_RELATIVE_SIZE(0.9f, 1.0f, 0.8f ); ///< ScrollView's relative size to its parent -const Vector3 TABLE_RELATIVE_SIZE(0.9f, 1.0f, 0.8f ); ///< TableView's relative size to the entire stage. The Y value will be calculated. +const Vector3 TABLE_RELATIVE_SIZE(0.9f, 0.9f, 0.8f ); ///< TableView's relative size to the entire stage. The Y value means sum of the logo and table relative heights. const float STENCIL_RELATIVE_SIZE = 1.0f; const float EFFECT_SNAP_DURATION = 0.66f; ///< Scroll Snap Duration for Effects @@ -276,11 +276,13 @@ void DaliTableView::Initialize( Application& application ) // Add logo mLogo = CreateLogo( LOGO_PATH ); - const float logoHeight = mLogo.GetImage().GetHeight() + DP(LOGO_MARGIN); + const float paddingHeight = ( ( 1.f-TABLE_RELATIVE_SIZE.y ) * stageSize.y ); + const float logoMargin = paddingHeight * LOGO_MARGIN_RATIO; + const float logoHeight = mLogo.GetImage().GetHeight() + logoMargin; mRootActor.SetFixedHeight( 1, logoHeight ); - mButtonsPageRelativeSize = Vector3( TABLE_RELATIVE_SIZE.x, ( stageSize.height - toolbarHeight - logoHeight - DP( BOTTOM_PADDING_HEIGHT ) ) / stageSize.height, TABLE_RELATIVE_SIZE.z ); - + const float bottomMargin = paddingHeight * BOTTOM_PADDING_RATIO; + mButtonsPageRelativeSize = Vector3( TABLE_RELATIVE_SIZE.x, 1.f - ( toolbarHeight + logoHeight + bottomMargin) / stageSize.height, TABLE_RELATIVE_SIZE.z ); mRootActor.SetFixedHeight( 2, mButtonsPageRelativeSize.y * stageSize.height ); Alignment alignment = Alignment::New(); diff --git a/examples/buttons/buttons-example.cpp b/examples/buttons/buttons-example.cpp index 11c19b0..af075b5 100644 --- a/examples/buttons/buttons-example.cpp +++ b/examples/buttons/buttons-example.cpp @@ -58,7 +58,7 @@ const char* const BIG_IMAGE_3 = DALI_IMAGE_DIR "gallery-large-13.jpg"; const char* const ENABLED_IMAGE = DALI_IMAGE_DIR "item-select-check.png"; const char* const PUSHBUTTON_PRESS_IMAGE = DALI_IMAGE_DIR "button-down.9.png"; -const char* const PUSHBUTTON_DIM_IMAGE = DALI_IMAGE_DIR "button-disabled.9.png"; +const char* const PUSHBUTTON_DISABLED_IMAGE = DALI_IMAGE_DIR "button-disabled.9.png"; const char* const PUSHBUTTON_BUTTON_IMAGE = DALI_IMAGE_DIR "button-up.9.png"; const char* const CHECKBOX_UNCHECKED_IMAGE = DALI_IMAGE_DIR "checkbox-unchecked.png"; @@ -148,7 +148,7 @@ class ButtonsController: public ConnectionTracker mRadioButtonImage1.SetParentOrigin( ParentOrigin::TOP_LEFT ); mRadioButtonImage1.SetAnchorPoint( AnchorPoint::TOP_LEFT ); mRadioButtonImage1.SetPosition( 0, DP(radioY) ); - mRadioButtonImage1.SetActive( true ); + mRadioButtonImage1.SetSelected( true ); radioButtonsGroup2.Add( mRadioButtonImage1 ); } @@ -188,11 +188,11 @@ class ButtonsController: public ConnectionTracker mUpdateButton.SetParentOrigin( ParentOrigin::BOTTOM_CENTER ); mUpdateButton.SetAnchorPoint( AnchorPoint::TOP_CENTER ); mUpdateButton.SetPosition( 0, DP(MARGIN_SIZE) ); - mUpdateButton.SetLabelText("Select"); + mUpdateButton.SetLabel("Select"); mUpdateButton.SetSize( DP(100), DP(BUTTON_HEIGHT) ); - mUpdateButton.SetPressedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); - mUpdateButton.SetDimmedImage( Dali::Image::New( PUSHBUTTON_DIM_IMAGE ) ); + mUpdateButton.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); + mUpdateButton.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); mUpdateButton.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); mUpdateButton.ClickedSignal().Connect( this, &ButtonsController::OnButtonClicked ); @@ -244,9 +244,9 @@ class ButtonsController: public ConnectionTracker radioButton.SetParentOrigin( ParentOrigin::TOP_LEFT ); radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT ); radioButton.SetPosition( 0, 0 ); - radioButton.SetActive( true ); + radioButton.SetSelected( true ); - radioButton.ToggledSignal().Connect( this, &ButtonsController::EnableSelectButtonToggle ); + radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButtonToggle ); radioButtonsGroup1.Add( radioButton ); } @@ -259,7 +259,7 @@ class ButtonsController: public ConnectionTracker radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT ); radioButton.SetPosition( 0, DP(50) ); - radioButton.ToggledSignal().Connect( this, &ButtonsController::EnableSelectButtonToggle ); + radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButtonToggle ); radioButtonsGroup1.Add( radioButton ); } @@ -288,7 +288,7 @@ class ButtonsController: public ConnectionTracker checkBox.SetBackgroundImage( unchecked ); checkBox.SetCheckedImage( checked ); checkBox.SetSize( DP(48), DP(48) ); - checkBox.ToggledSignal().Connect( this, &ButtonsController::OnCheckBoxesToggled ); + checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesToggled ); checkBoxBackground.Add( checkBox ); } @@ -304,7 +304,7 @@ class ButtonsController: public ConnectionTracker checkBox.SetCheckedImage( checked ); checkBox.SetSize( DP(48), DP(48) ); checkBox.SetChecked( true ); - checkBox.ToggledSignal().Connect( this, &ButtonsController::OnCheckBoxesToggled ); + checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesToggled ); checkBoxBackground.Add( checkBox ); } @@ -319,7 +319,7 @@ class ButtonsController: public ConnectionTracker checkBox.SetBackgroundImage( unchecked ); checkBox.SetCheckedImage( checked ); checkBox.SetSize( DP(48), DP(48) ); - checkBox.ToggledSignal().Connect( this, &ButtonsController::OnCheckBoxesToggled ); + checkBox.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesToggled ); checkBoxBackground.Add( checkBox ); } @@ -339,14 +339,14 @@ class ButtonsController: public ConnectionTracker toggleButton.SetParentOrigin( ParentOrigin::TOP_LEFT ); toggleButton.SetAnchorPoint( AnchorPoint::TOP_LEFT ); toggleButton.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) ); - toggleButton.SetLabelText( "Toggle OFF" ); + toggleButton.SetLabel( "Toggle OFF" ); toggleButton.SetSize( DP(150), DP(BUTTON_HEIGHT) ); - toggleButton.SetPressedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); - toggleButton.SetDimmedImage( Dali::Image::New( PUSHBUTTON_DIM_IMAGE ) ); + toggleButton.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); + toggleButton.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); toggleButton.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); - toggleButton.ToggledSignal().Connect( this, &ButtonsController::OnButtonToggled ); + toggleButton.StateChangedSignal().Connect( this, &ButtonsController::OnButtonToggled ); toggleBackground.Add( toggleButton ); } @@ -370,11 +370,11 @@ class ButtonsController: public ConnectionTracker { if( state ) { - pushButton.SetLabelText( "Toggle ON" ); + pushButton.SetLabel( "Toggle ON" ); } else { - pushButton.SetLabelText( "Toggle OFF" ); + pushButton.SetLabel( "Toggle OFF" ); } } @@ -385,11 +385,11 @@ class ButtonsController: public ConnectionTracker { if( button.GetName() == "radio-select-enable" && state == true ) { - mUpdateButton.SetDimmed( false ); + mUpdateButton.SetDisabled( false ); } else if( button.GetName() == "radio-select-disable" && state == true ) { - mUpdateButton.SetDimmed( true ); + mUpdateButton.SetDisabled( true ); } return true; @@ -397,15 +397,15 @@ class ButtonsController: public ConnectionTracker bool OnButtonClicked(Toolkit::Button button) { - if( mRadioButtonImage1.IsActive() ) + if( mRadioButtonImage1.IsSelected() ) { mImage.SetImage( mBigImage1 ); } - else if( mRadioButtonImage2.IsActive() ) + else if( mRadioButtonImage2.IsSelected() ) { mImage.SetImage( mBigImage2 ); } - else if( mRadioButtonImage3.IsActive() ) + else if( mRadioButtonImage3.IsSelected() ) { mImage.SetImage( mBigImage3 ); } diff --git a/examples/logging/logging-example.cpp b/examples/logging/logging-example.cpp index 8e700ee..c6fc20c 100644 --- a/examples/logging/logging-example.cpp +++ b/examples/logging/logging-example.cpp @@ -79,7 +79,7 @@ const Vector4 BACKGROUND_COLOUR( 1.0f, 1.0f, 1.0f, 0.15f ); const char* const PUSHBUTTON_PRESS_IMAGE = DALI_IMAGE_DIR "button-down.9.png"; const char* const PUSHBUTTON_BUTTON_IMAGE = DALI_IMAGE_DIR "button-up.9.png"; -const char* const PUSHBUTTON_DIM_IMAGE = DALI_IMAGE_DIR "button-disabled.9.png"; +const char* const PUSHBUTTON_DISABLED_IMAGE = DALI_IMAGE_DIR "button-disabled.9.png"; // Button IDs const char* const LOGGER_1_RADIO_ID = "LOGGER_1_RADIO"; @@ -214,9 +214,9 @@ class LoggingController: public ConnectionTracker radioButton.SetParentOrigin( ParentOrigin::TOP_LEFT ); radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT ); radioButton.SetPosition( DP(radioX), DP(radioY) ); - radioButton.SetActive( true ); + radioButton.SetSelected( true ); - radioButton.ToggledSignal().Connect( this, &LoggingController::LoggingRadioSelect ); + radioButton.StateChangedSignal().Connect( this, &LoggingController::LoggingRadioSelect ); radioButtonsGroup.Add( radioButton ); mLogRadioButtons[0] = radioButton; @@ -232,7 +232,7 @@ class LoggingController: public ConnectionTracker radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT ); radioButton.SetPosition( DP(radioX), DP(radioY) ); - radioButton.ToggledSignal().Connect( this, &LoggingController::LoggingRadioSelect ); + radioButton.StateChangedSignal().Connect( this, &LoggingController::LoggingRadioSelect ); radioButtonsGroup.Add( radioButton ); mLogRadioButtons[1] = radioButton; @@ -248,7 +248,7 @@ class LoggingController: public ConnectionTracker radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT ); radioButton.SetPosition( DP(radioX), DP(radioY) ); - radioButton.ToggledSignal().Connect( this, &LoggingController::LoggingRadioSelect ); + radioButton.StateChangedSignal().Connect( this, &LoggingController::LoggingRadioSelect ); radioButtonsGroup.Add( radioButton ); mLogRadioButtons[2] = radioButton; @@ -270,15 +270,15 @@ class LoggingController: public ConnectionTracker { Toolkit::PushButton button = Toolkit::PushButton::New(); button.SetName( CREATE_BUTTON_ID ); - button.SetLabelText( CREATE_BUTTON_TEXT ); + button.SetLabel( CREATE_BUTTON_TEXT ); button.SetParentOrigin( ParentOrigin::CENTER_LEFT ); button.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); button.SetPosition( buttonXDP, 0 ); button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); - button.SetPressedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); + button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); - button.SetDimmedImage( Dali::Image::New( PUSHBUTTON_DIM_IMAGE ) ); + button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); @@ -290,15 +290,15 @@ class LoggingController: public ConnectionTracker Toolkit::PushButton button = Toolkit::PushButton::New(); button.SetName( DELETE_BUTTON_ID ); - button.SetLabelText( DELETE_BUTTON_TEXT ); + button.SetLabel( DELETE_BUTTON_TEXT ); button.SetParentOrigin( ParentOrigin::CENTER_LEFT ); button.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); button.SetPosition( buttonXDP, 0 ); button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); - button.SetPressedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); + button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); - button.SetDimmedImage( Dali::Image::New( PUSHBUTTON_DIM_IMAGE ) ); + button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); @@ -321,15 +321,15 @@ class LoggingController: public ConnectionTracker { Toolkit::PushButton button = Toolkit::PushButton::New(); button.SetName( START_BUTTON_ID ); - button.SetLabelText( START_BUTTON_TEXT ); + button.SetLabel( START_BUTTON_TEXT ); button.SetParentOrigin( ParentOrigin::CENTER_LEFT ); button.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); button.SetPosition( buttonXDP, 0 ); button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); - button.SetPressedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); + button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); - button.SetDimmedImage( Dali::Image::New( PUSHBUTTON_DIM_IMAGE ) ); + button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); @@ -341,15 +341,15 @@ class LoggingController: public ConnectionTracker Toolkit::PushButton button = Toolkit::PushButton::New(); button.SetName( STOP_BUTTON_ID ); - button.SetLabelText( STOP_BUTTON_TEXT ); + button.SetLabel( STOP_BUTTON_TEXT ); button.SetParentOrigin( ParentOrigin::CENTER_LEFT ); button.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); button.SetPosition( buttonXDP, 0 ); button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); - button.SetPressedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); + button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); - button.SetDimmedImage( Dali::Image::New( PUSHBUTTON_DIM_IMAGE ) ); + button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); @@ -372,15 +372,15 @@ class LoggingController: public ConnectionTracker { Toolkit::PushButton button = Toolkit::PushButton::New(); button.SetName( ENABLE_BUTTON_ID ); - button.SetLabelText( ENABLE_BUTTON_TEXT ); + button.SetLabel( ENABLE_BUTTON_TEXT ); button.SetParentOrigin( ParentOrigin::CENTER_LEFT ); button.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); button.SetPosition( buttonXDP, 0 ); button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); - button.SetPressedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); + button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); - button.SetDimmedImage( Dali::Image::New( PUSHBUTTON_DIM_IMAGE ) ); + button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); @@ -392,15 +392,15 @@ class LoggingController: public ConnectionTracker Toolkit::PushButton button = Toolkit::PushButton::New(); button.SetName( DISABLE_BUTTON_ID ); - button.SetLabelText( DISABLE_BUTTON_TEXT ); + button.SetLabel( DISABLE_BUTTON_TEXT ); button.SetParentOrigin( ParentOrigin::CENTER_LEFT ); button.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); button.SetPosition( buttonXDP, 0 ); button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); - button.SetPressedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); + button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); - button.SetDimmedImage( Dali::Image::New( PUSHBUTTON_DIM_IMAGE ) ); + button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); @@ -439,7 +439,7 @@ class LoggingController: public ConnectionTracker radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT ); radioButton.SetPosition( DP(radioX), DP(radioY) ); - radioButton.ToggledSignal().Connect( this, &LoggingController::FrequencyRadioSelect ); + radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect ); frequencyRadioButtonsGroup.Add( radioButton ); mFrequencyRadioButtons[0] = radioButton; @@ -454,9 +454,9 @@ class LoggingController: public ConnectionTracker radioButton.SetParentOrigin( ParentOrigin::TOP_LEFT ); radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT ); radioButton.SetPosition( DP(radioX), DP(radioY) ); - radioButton.SetActive( true ); + radioButton.SetSelected( true ); - radioButton.ToggledSignal().Connect( this, &LoggingController::FrequencyRadioSelect ); + radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect ); frequencyRadioButtonsGroup.Add( radioButton ); mFrequencyRadioButtons[1] = radioButton; @@ -472,7 +472,7 @@ class LoggingController: public ConnectionTracker radioButton.SetAnchorPoint( AnchorPoint::TOP_LEFT ); radioButton.SetPosition( DP(radioX), DP(radioY) ); - radioButton.ToggledSignal().Connect( this, &LoggingController::FrequencyRadioSelect ); + radioButton.StateChangedSignal().Connect( this, &LoggingController::FrequencyRadioSelect ); frequencyRadioButtonsGroup.Add( radioButton ); mFrequencyRadioButtons[2] = radioButton; @@ -494,15 +494,15 @@ class LoggingController: public ConnectionTracker { Toolkit::PushButton button = Toolkit::PushButton::New(); button.SetName( VSYNC_BUTTON_ID ); - button.SetLabelText( VSYNC_BUTTON_TEXT ); + button.SetLabel( VSYNC_BUTTON_TEXT ); button.SetParentOrigin( ParentOrigin::CENTER_LEFT ); button.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); button.SetPosition( buttonXDP, 0 ); button.SetSize( buttonWidthDP, DP(BUTTON_HEIGHT) ); - button.SetPressedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); + button.SetSelectedImage( Dali::Image::New( PUSHBUTTON_PRESS_IMAGE ) ); button.SetButtonImage( Dali::Image::New( PUSHBUTTON_BUTTON_IMAGE ) ); - button.SetDimmedImage( Dali::Image::New( PUSHBUTTON_DIM_IMAGE ) ); + button.SetDisabledImage( Dali::Image::New( PUSHBUTTON_DISABLED_IMAGE ) ); button.ClickedSignal().Connect( this, &LoggingController::OnButtonClicked ); @@ -543,15 +543,15 @@ class LoggingController: public ConnectionTracker const unsigned int frequency = mLoggerStates[mCurrentLogger].frequency; if( frequency == HIGH_FREQUENCY ) { - mFrequencyRadioButtons[0].SetActive( true ); + mFrequencyRadioButtons[0].SetSelected( true ); } else if( frequency == MEDIUM_FREQUENCY ) { - mFrequencyRadioButtons[1].SetActive( true ); + mFrequencyRadioButtons[1].SetSelected( true ); } else if( frequency == LOW_FREQUENCY ) { - mFrequencyRadioButtons[2].SetActive( true ); + mFrequencyRadioButtons[2].SetSelected( true ); } } diff --git a/examples/magnifier/magnifier-example.cpp b/examples/magnifier/magnifier-example.cpp index 4302665..aee8adc 100644 --- a/examples/magnifier/magnifier-example.cpp +++ b/examples/magnifier/magnifier-example.cpp @@ -236,7 +236,6 @@ public: mMagnifier.SetSourceActor( mView.GetBackgroundLayer() ); mMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width mMagnifier.SetMagnificationFactor( MAGNIFICATION_FACTOR ); - mMagnifier.SetFrameVisibility(false); mMagnifier.SetScale(Vector3::ZERO); overlay.Add( mMagnifier ); diff --git a/examples/shader-effect/refraction-effect-example.cpp b/examples/shader-effect/refraction-effect-example.cpp index e9a1a9c..f1325cc 100644 --- a/examples/shader-effect/refraction-effect-example.cpp +++ b/examples/shader-effect/refraction-effect-example.cpp @@ -94,6 +94,7 @@ public: static NoEffect New() { std::string vertexShader = MAKE_SHADER( + precision mediump float;\n uniform mediump vec4 uTextureRect;\n void main()\n {\n @@ -102,6 +103,7 @@ public: }\n ); std::string fragmentShader = MAKE_SHADER( + precision mediump float;\n void main()\n {\n gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor;\n @@ -153,6 +155,7 @@ public: static RefractionEffect New() { std::string vertexShader = MAKE_SHADER( + precision mediump float;\n varying mediump vec2 vTextureOffset;\n void main()\n {\n @@ -167,6 +170,7 @@ public: ); std::string fragmentShader = MAKE_SHADER( + precision mediump float;\n uniform mediump float uEffectStrength;\n uniform mediump vec3 uLightPosition;\n uniform mediump vec2 uLightXYOffset;\n @@ -205,7 +209,7 @@ public: {\n vec3 normal = normalize( vNormal);\n - vec3 lightPosition = uLightPosition + vec3(uLightXYOffset+uLightSpinOffset, 0.f);\n + vec3 lightPosition = uLightPosition + vec3(uLightXYOffset+uLightSpinOffset, 0.0);\n mediump vec3 vecToLight = normalize( (lightPosition - vVertex.xyz) * 0.01 );\n mediump float spotEffect = pow( max(0.05, vecToLight.z ) - 0.05, 8.0);\n diff --git a/packaging/com.samsung.dali-demo.spec b/packaging/com.samsung.dali-demo.spec index 7c3bee2..8665067 100755 --- a/packaging/com.samsung.dali-demo.spec +++ b/packaging/com.samsung.dali-demo.spec @@ -2,7 +2,7 @@ Name: com.samsung.dali-demo Summary: The OpenGLES Canvas Core Demo -Version: 1.0.26 +Version: 1.0.28 Release: 1 Group: System/Libraries License: Apache-2.0 @@ -74,7 +74,7 @@ cp -f %{_builddir}/%{name}-%{version}/%{name}.xml %{buildroot}%{dali_xml_file_di mkdir -p %{buildroot}%{dali_icon_dir} mv %{buildroot}/%{dali_app_ro_dir}/images/%{name}.png %{buildroot}%{dali_icon_dir} -%if !%{with wayland} +%if 0%{?enable_dali_smack_rules} && !%{with wayland} mkdir -p %{buildroot}%{smack_rule_dir} cp -f %{_builddir}/%{name}-%{version}/%{name}.rule %{buildroot}%{smack_rule_dir} %endif @@ -116,7 +116,7 @@ exit 0 %{dali_app_ro_dir}/scripts/* %{dali_xml_file_dir}/%{name}.xml %{dali_icon_dir}/* -%if !%{with wayland} +%if 0%{?enable_dali_smack_rules} && !%{with wayland} %config %{smack_rule_dir}/%{name}.rule %endif %{_datadir}/license/%{name}