/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
void StylingApplication::Create( Application& application )
{
- Stage stage = Stage::GetCurrent();
- stage.KeyEventSignal().Connect(this, &StylingApplication::OnKeyEvent);
- stage.SetBackgroundColor( Vector4( 0.1f, 0.1f, 0.1f, 1.0f ) );
-
- // Hide the indicator bar
- application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
+ Window window = application.GetWindow();
+ window.KeyEventSignal().Connect(this, &StylingApplication::OnKeyEvent);
+ window.SetBackgroundColor( Vector4( 0.1f, 0.1f, 0.1f, 1.0f ) );
mContentPane = CreateContentPane();
- stage.Add( mContentPane );
- mContentPane.SetProperty( Actor::Property::SIZE, stage.GetSize() );
+ window.Add( mContentPane );
+ mContentPane.SetProperty( Actor::Property::SIZE, Vector2(window.GetSize()) );
// Content panes:
TableView contentLayout = TableView::New( 5, 1 );
Popup StylingApplication::CreateResetPopup()
{
- Stage stage = Stage::GetCurrent();
+ Window window = mApplication.GetWindow();
Popup popup= Popup::New();
popup.SetProperty( Dali::Actor::Property::NAME,"ResetPopup");
popup.SetStyleName("ResetPopup");
popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- popup.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width * 0.75f, 0.0f ) );
+ popup.SetProperty( Actor::Property::SIZE, Vector2( window.GetSize().GetWidth() * 0.75f, 0.0f ) );
popup.SetProperty( Popup::Property::TAIL_VISIBILITY, false );
popup.OutsideTouchedSignal().Connect( this, &StylingApplication::HidePopup );
popup.HiddenSignal().Connect( this, &StylingApplication::PopupHidden );
Property::Index index = button.GetPropertyIndex("channel");
if( index != Property::INVALID_INDEX )
{
- int channel = button.GetProperty<int>( index );
- float value = mChannelSliders[channel].GetProperty<float>( Slider::Property::VALUE );
- if( !button.GetProperty<bool>(Button::Property::SELECTED) )
+ int channel = button["channel"];
+ float value = mChannelSliders[channel][Slider::Property::VALUE];
+ if( !button[Button::Property::SELECTED] )
{
// "Turn off" the channel's contribution
value = 0.0f;
mResetPopup = CreateResetPopup ();
}
- Stage::GetCurrent().Add( mResetPopup );
+ mApplication.GetWindow().Add( mResetPopup );
mResetPopup.SetDisplayState( Popup::SHOWN );
return true;
Property::Index index = slider.GetPropertyIndex("channel");
if( index != Property::INVALID_INDEX )
{
- int channel = slider.GetProperty<int>( index );
- if( mCheckButtons[channel].GetProperty<bool>(Button::Property::SELECTED) )
+ int channel = slider["channel"];
+ if( mCheckButtons[channel]["selected"])
{
Property::Index channelIndex = GetChannelProperty( channel );
mImageChannelControl.SetProperty(channelIndex, value/100.0f);