#include <fstream>
#include <streambuf>
#include <sstream>
-#include <boost/scoped_ptr.hpp>
#include <dirent.h>
#include <stdio.h>
#include <iostream>
-//#include <boost/regex.hpp>
#include "sys/stat.h"
#include <ctime>
'stage': \
[ \
{ \
- 'type':'TextView', \
+ 'type':'TextLabel', \
'size': [50,50,1], \
'parent-origin': 'CENTER', \
'text':'COULD NOT LOAD JSON FILE' \
{
if(!mTitleActor)
{
- mTitleActor = TextView::New();
+ mTitleActor = DemoHelper::CreateToolBarLabel( "" );
// Add title to the tool bar.
mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Alignment::HorizontalCenter );
}
- Font font = Font::New();
- mTitleActor.SetText( title );
- mTitleActor.SetSize( font.MeasureText( title ) );
- mTitleActor.SetStyleToCurrentText(DemoHelper::GetDefaultTextStyle());
+ mTitleActor.SetProperty( TextLabel::Property::TEXT, title );
}
bool OnToolSelectLayout( Toolkit::Button button )
Actor MenuItem(const std::string& text)
{
- TextView t = TextView::New();
- t.SetMarkupProcessingEnabled(true);
-
- int size = static_cast<int>(DemoHelper::ScalePointSize(6));
-
- std::ostringstream fontString;
- fontString << "<font size="<< size <<">"<< ShortName( text ) << "</font>";
-
- t.SetText( fontString.str() );
-
- t.SetTextAlignment( Alignment::HorizontalLeft );
+ TextLabel label = TextLabel::New( ShortName( text ) );
+ label.SetProperty( Dali::Toolkit::Control::Property::STYLE_NAME, "builderlabel" );
+ label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
// Hook up tap detector
- mTapDetector.Attach( t );
+ mTapDetector.Attach( label );
- return t;
+ return label;
}
bool OnTimer()
}
builder.AddActors( layer );
-
}
void Create(Application& app)
{
+ DemoHelper::RequestThemeChange();
+
Stage stage = Stage::GetCurrent();
Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleApp::OnKeyEvent);
unsigned int mOrientation;
Toolkit::ToolBar mToolBar;
- TextView mTitleActor; ///< The Toolbar's Title.
+ TextLabel mTitleActor; ///< The Toolbar's Title.
Layer mBuilderLayer;