Commit 0727b27d000e0ce5968846b51a55311592f04655

Authored by Paul Wisbey
1 parent acbfb8bb

Supply stylesheet using Application constructor

Change-Id: Ieab919e1ef93b46b66f1049a2845005d94bbf72f
Showing 34 changed files with 31 additions and 94 deletions
demo/dali-demo.cpp
@@ -31,7 +31,7 @@ int main(int argc, char **argv) @@ -31,7 +31,7 @@ int main(int argc, char **argv)
31 textdomain(DALI_DEMO_DOMAIN_LOCAL); 31 textdomain(DALI_DEMO_DOMAIN_LOCAL);
32 setlocale(LC_ALL, DALI_LANG); 32 setlocale(LC_ALL, DALI_LANG);
33 33
34 - Application app = Application::New(&argc, &argv); 34 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
35 35
36 // Create the demo launcher 36 // Create the demo launcher
37 DaliTableView demo(app); 37 DaliTableView demo(app);
demo/dali-table-view.cpp
@@ -204,8 +204,6 @@ void DaliTableView::SortAlphabetically( bool sortAlphabetically ) @@ -204,8 +204,6 @@ void DaliTableView::SortAlphabetically( bool sortAlphabetically )
204 204
205 void DaliTableView::Initialize( Application& application ) 205 void DaliTableView::Initialize( Application& application )
206 { 206 {
207 - DemoHelper::RequestThemeChange();  
208 -  
209 Stage::GetCurrent().KeyEventSignal().Connect( this, &DaliTableView::OnKeyEvent ); 207 Stage::GetCurrent().KeyEventSignal().Connect( this, &DaliTableView::OnKeyEvent );
210 208
211 const Vector2 stageSize = Stage::GetCurrent().GetSize(); 209 const Vector2 stageSize = Stage::GetCurrent().GetSize();
examples/animated-shapes/animated-shapes-example.cpp
@@ -52,8 +52,6 @@ public: @@ -52,8 +52,6 @@ public:
52 // The Init signal is received once (only) during the Application lifetime 52 // The Init signal is received once (only) during the Application lifetime
53 void Create( Application& application ) 53 void Create( Application& application )
54 { 54 {
55 - DemoHelper::RequestThemeChange();  
56 -  
57 // Get a handle to the stage 55 // Get a handle to the stage
58 Stage stage = Stage::GetCurrent(); 56 Stage stage = Stage::GetCurrent();
59 57
@@ -376,7 +374,7 @@ void RunTest( Application& application ) @@ -376,7 +374,7 @@ void RunTest( Application& application )
376 374
377 int main( int argc, char **argv ) 375 int main( int argc, char **argv )
378 { 376 {
379 - Application application = Application::New( &argc, &argv ); 377 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
380 RunTest( application ); 378 RunTest( application );
381 379
382 return 0; 380 return 0;
examples/atlas/atlas-example.cpp
@@ -226,7 +226,7 @@ void RunTest( Application& application ) @@ -226,7 +226,7 @@ void RunTest( Application& application )
226 // 226 //
227 int main( int argc, char **argv ) 227 int main( int argc, char **argv )
228 { 228 {
229 - gApplication = Application::New( &argc, &argv ); 229 + gApplication = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
230 230
231 RunTest( gApplication ); 231 RunTest( gApplication );
232 232
examples/blocks/blocks-example.cpp
@@ -226,8 +226,6 @@ public: @@ -226,8 +226,6 @@ public:
226 */ 226 */
227 void Create(Application& application) 227 void Create(Application& application)
228 { 228 {
229 - DemoHelper::RequestThemeChange();  
230 -  
231 Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); 229 Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
232 230
233 // Creates a default view with a default tool bar. 231 // Creates a default view with a default tool bar.
@@ -841,7 +839,7 @@ void RunTest(Application& app) @@ -841,7 +839,7 @@ void RunTest(Application& app)
841 839
842 int main(int argc, char **argv) 840 int main(int argc, char **argv)
843 { 841 {
844 - Application app = Application::New(&argc, &argv); 842 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
845 843
846 RunTest(app); 844 RunTest(app);
847 845
examples/bubble-effect/bubble-effect-example.cpp
@@ -92,8 +92,6 @@ private: @@ -92,8 +92,6 @@ private:
92 // The Init signal is received once (only) during the Application lifetime 92 // The Init signal is received once (only) during the Application lifetime
93 void Create(Application& app) 93 void Create(Application& app)
94 { 94 {
95 - DemoHelper::RequestThemeChange();  
96 -  
97 Stage stage = Stage::GetCurrent(); 95 Stage stage = Stage::GetCurrent();
98 Vector2 stageSize = stage.GetSize(); 96 Vector2 stageSize = stage.GetSize();
99 97
@@ -320,7 +318,7 @@ RunTest(Application& app) @@ -320,7 +318,7 @@ RunTest(Application& app)
320 int 318 int
321 main(int argc, char **argv) 319 main(int argc, char **argv)
322 { 320 {
323 - Application app = Application::New(&argc, &argv); 321 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
324 322
325 RunTest(app); 323 RunTest(app);
326 324
examples/builder/examples.cpp
@@ -493,8 +493,6 @@ public: @@ -493,8 +493,6 @@ public:
493 493
494 void Create(Application& app) 494 void Create(Application& app)
495 { 495 {
496 - DemoHelper::RequestThemeChange();  
497 -  
498 Stage stage = Stage::GetCurrent(); 496 Stage stage = Stage::GetCurrent();
499 497
500 Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleApp::OnKeyEvent); 498 Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleApp::OnKeyEvent);
@@ -618,7 +616,7 @@ int main(int argc, char **argv) @@ -618,7 +616,7 @@ int main(int argc, char **argv)
618 } 616 }
619 } 617 }
620 618
621 - Application app = Application::New(&argc, &argv); 619 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
622 620
623 ExampleApp dali_app(app); 621 ExampleApp dali_app(app);
624 622
examples/buttons/buttons-example.cpp
@@ -97,8 +97,6 @@ class ButtonsController: public ConnectionTracker @@ -97,8 +97,6 @@ class ButtonsController: public ConnectionTracker
97 { 97 {
98 // The Init signal is received once (only) during the Application lifetime 98 // The Init signal is received once (only) during the Application lifetime
99 99
100 - DemoHelper::RequestThemeChange();  
101 -  
102 // Respond to key events 100 // Respond to key events
103 Stage::GetCurrent().KeyEventSignal().Connect(this, &ButtonsController::OnKeyEvent); 101 Stage::GetCurrent().KeyEventSignal().Connect(this, &ButtonsController::OnKeyEvent);
104 102
@@ -528,7 +526,7 @@ void RunTest( Application& application ) @@ -528,7 +526,7 @@ void RunTest( Application& application )
528 // 526 //
529 int main( int argc, char **argv ) 527 int main( int argc, char **argv )
530 { 528 {
531 - Application application = Application::New( &argc, &argv ); 529 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
532 530
533 RunTest( application ); 531 RunTest( application );
534 532
examples/cluster/cluster-example.cpp
@@ -360,8 +360,6 @@ public: @@ -360,8 +360,6 @@ public:
360 */ 360 */
361 void Create(Application& application) 361 void Create(Application& application)
362 { 362 {
363 - DemoHelper::RequestThemeChange();  
364 -  
365 Stage::GetCurrent().KeyEventSignal().Connect(this, &ClusterController::OnKeyEvent); 363 Stage::GetCurrent().KeyEventSignal().Connect(this, &ClusterController::OnKeyEvent);
366 364
367 // The Init signal is received once (only) during the Application lifetime 365 // The Init signal is received once (only) during the Application lifetime
@@ -781,7 +779,7 @@ void RunTest(Application& app) @@ -781,7 +779,7 @@ void RunTest(Application& app)
781 // 779 //
782 int main(int argc, char **argv) 780 int main(int argc, char **argv)
783 { 781 {
784 - Application app = Application::New(&argc, &argv); 782 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
785 783
786 RunTest(app); 784 RunTest(app);
787 785
examples/cube-transition-effect/cube-transition-effect-example.cpp
@@ -224,8 +224,6 @@ CubeTransitionApp::~CubeTransitionApp() @@ -224,8 +224,6 @@ CubeTransitionApp::~CubeTransitionApp()
224 224
225 void CubeTransitionApp::OnInit( Application& application ) 225 void CubeTransitionApp::OnInit( Application& application )
226 { 226 {
227 - DemoHelper::RequestThemeChange();  
228 -  
229 Stage::GetCurrent().KeyEventSignal().Connect(this, &CubeTransitionApp::OnKeyEvent); 227 Stage::GetCurrent().KeyEventSignal().Connect(this, &CubeTransitionApp::OnKeyEvent);
230 228
231 // Creates a default view with a default tool bar, the view is added to the stage. 229 // Creates a default view with a default tool bar, the view is added to the stage.
@@ -435,7 +433,7 @@ void CubeTransitionApp::OnKeyEvent(const KeyEvent& event) @@ -435,7 +433,7 @@ void CubeTransitionApp::OnKeyEvent(const KeyEvent& event)
435 // Entry point for Linux & Tizen applications 433 // Entry point for Linux & Tizen applications
436 int main( int argc, char **argv ) 434 int main( int argc, char **argv )
437 { 435 {
438 - Application application = Application::New( &argc, &argv ); 436 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
439 CubeTransitionApp test( application ); 437 CubeTransitionApp test( application );
440 application.MainLoop(); 438 application.MainLoop();
441 439
examples/dissolve-effect/dissolve-effect-example.cpp
@@ -204,8 +204,6 @@ DissolveEffectApp::~DissolveEffectApp() @@ -204,8 +204,6 @@ DissolveEffectApp::~DissolveEffectApp()
204 204
205 void DissolveEffectApp::OnInit( Application& application ) 205 void DissolveEffectApp::OnInit( Application& application )
206 { 206 {
207 - DemoHelper::RequestThemeChange();  
208 -  
209 Stage::GetCurrent().KeyEventSignal().Connect(this, &DissolveEffectApp::OnKeyEvent); 207 Stage::GetCurrent().KeyEventSignal().Connect(this, &DissolveEffectApp::OnKeyEvent);
210 208
211 // Creates a default view with a default tool bar, the view is added to the stage. 209 // Creates a default view with a default tool bar, the view is added to the stage.
@@ -430,7 +428,7 @@ bool DissolveEffectApp::OnTimerTick() @@ -430,7 +428,7 @@ bool DissolveEffectApp::OnTimerTick()
430 // Entry point for Linux & Tizen applications 428 // Entry point for Linux & Tizen applications
431 int main( int argc, char **argv ) 429 int main( int argc, char **argv )
432 { 430 {
433 - Application application = Application::New( &argc, &argv ); 431 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
434 DissolveEffectApp test( application ); 432 DissolveEffectApp test( application );
435 application.MainLoop(); 433 application.MainLoop();
436 434
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
@@ -171,9 +171,6 @@ public: @@ -171,9 +171,6 @@ public:
171 // The Init signal is received once (only) during the Application lifetime 171 // The Init signal is received once (only) during the Application lifetime
172 void Create( Application& application ) 172 void Create( Application& application )
173 { 173 {
174 - // Apply the default theme:  
175 - DemoHelper::RequestThemeChange();  
176 -  
177 // Get a handle to the stage 174 // Get a handle to the stage
178 Stage stage = Stage::GetCurrent(); 175 Stage stage = Stage::GetCurrent();
179 176
@@ -732,7 +729,7 @@ void RunTest( Application& application ) @@ -732,7 +729,7 @@ void RunTest( Application& application )
732 // Entry point for Linux & Tizen applications 729 // Entry point for Linux & Tizen applications
733 int main( int argc, char **argv ) 730 int main( int argc, char **argv )
734 { 731 {
735 - Application application = Application::New( &argc, &argv ); 732 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
736 733
737 RunTest( application ); 734 RunTest( application );
738 735
examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
@@ -287,8 +287,6 @@ public: @@ -287,8 +287,6 @@ public:
287 { 287 {
288 std::cout << "ImageScalingIrregularGridController::Create" << std::endl; 288 std::cout << "ImageScalingIrregularGridController::Create" << std::endl;
289 289
290 - DemoHelper::RequestThemeChange();  
291 -  
292 // Get a handle to the stage: 290 // Get a handle to the stage:
293 Stage stage = Stage::GetCurrent(); 291 Stage stage = Stage::GetCurrent();
294 292
@@ -611,7 +609,7 @@ void RunTest( Application&amp; application ) @@ -611,7 +609,7 @@ void RunTest( Application&amp; application )
611 /** Entry point for Linux & Tizen applications */ 609 /** Entry point for Linux & Tizen applications */
612 int main( int argc, char **argv ) 610 int main( int argc, char **argv )
613 { 611 {
614 - Application application = Application::New( &argc, &argv ); 612 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
615 613
616 RunTest( application ); 614 RunTest( application );
617 615
examples/item-view/item-view-example.cpp
@@ -203,8 +203,6 @@ public: @@ -203,8 +203,6 @@ public:
203 */ 203 */
204 void OnInit(Application& app) 204 void OnInit(Application& app)
205 { 205 {
206 - DemoHelper::RequestThemeChange();  
207 -  
208 Stage stage = Dali::Stage::GetCurrent(); 206 Stage stage = Dali::Stage::GetCurrent();
209 stage.KeyEventSignal().Connect(this, &ItemViewExample::OnKeyEvent); 207 stage.KeyEventSignal().Connect(this, &ItemViewExample::OnKeyEvent);
210 208
@@ -991,7 +989,7 @@ void RunTest(Application&amp; app) @@ -991,7 +989,7 @@ void RunTest(Application&amp; app)
991 989
992 int main(int argc, char **argv) 990 int main(int argc, char **argv)
993 { 991 {
994 - Application app = Application::New(&argc, &argv); 992 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
995 993
996 RunTest(app); 994 RunTest(app);
997 995
examples/logging/logging-example.cpp
@@ -145,8 +145,6 @@ class LoggingController: public ConnectionTracker @@ -145,8 +145,6 @@ class LoggingController: public ConnectionTracker
145 { 145 {
146 // The Init signal is received once (only) during the Application lifetime 146 // The Init signal is received once (only) during the Application lifetime
147 147
148 - DemoHelper::RequestThemeChange();  
149 -  
150 mCurrentLogger = 0; 148 mCurrentLogger = 0;
151 mPerformanceLoggers.reserve( NUM_LOGGERS ); 149 mPerformanceLoggers.reserve( NUM_LOGGERS );
152 mPerformanceLoggers.resize( NUM_LOGGERS ); 150 mPerformanceLoggers.resize( NUM_LOGGERS );
@@ -756,7 +754,7 @@ void RunTest( Application&amp; application ) @@ -756,7 +754,7 @@ void RunTest( Application&amp; application )
756 // 754 //
757 int main( int argc, char **argv ) 755 int main( int argc, char **argv )
758 { 756 {
759 - Application application = Application::New( &argc, &argv ); 757 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
760 758
761 RunTest( application ); 759 RunTest( application );
762 760
examples/magnifier/magnifier-example.cpp
@@ -193,8 +193,6 @@ public: @@ -193,8 +193,6 @@ public:
193 */ 193 */
194 void Create( Application& application ) 194 void Create( Application& application )
195 { 195 {
196 - DemoHelper::RequestThemeChange();  
197 -  
198 Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); 196 Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
199 197
200 mStageSize = Stage::GetCurrent().GetSize(); 198 mStageSize = Stage::GetCurrent().GetSize();
@@ -415,7 +413,7 @@ void RunTest( Application&amp; application ) @@ -415,7 +413,7 @@ void RunTest( Application&amp; application )
415 // 413 //
416 int main( int argc, char **argv ) 414 int main( int argc, char **argv )
417 { 415 {
418 - Application application = Application::New( &argc, &argv ); 416 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
419 417
420 RunTest( application ); 418 RunTest( application );
421 419
examples/motion-blur/motion-blur-example.cpp
@@ -561,7 +561,7 @@ void RunTest(Application&amp; app) @@ -561,7 +561,7 @@ void RunTest(Application&amp; app)
561 // 561 //
562 int main(int argc, char **argv) 562 int main(int argc, char **argv)
563 { 563 {
564 - Application app = Application::New(&argc, &argv); 564 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
565 565
566 RunTest(app); 566 RunTest(app);
567 567
examples/motion-stretch/motion-stretch-example.cpp
@@ -125,8 +125,6 @@ public: @@ -125,8 +125,6 @@ public:
125 { 125 {
126 // The Init signal is received once (only) during the Application lifetime 126 // The Init signal is received once (only) during the Application lifetime
127 127
128 - DemoHelper::RequestThemeChange();  
129 -  
130 Stage::GetCurrent().KeyEventSignal().Connect(this, &MotionStretchExampleApp::OnKeyEvent); 128 Stage::GetCurrent().KeyEventSignal().Connect(this, &MotionStretchExampleApp::OnKeyEvent);
131 129
132 // Creates a default view with a default tool bar. 130 // Creates a default view with a default tool bar.
@@ -442,7 +440,7 @@ void RunTest(Application&amp; app) @@ -442,7 +440,7 @@ void RunTest(Application&amp; app)
442 // 440 //
443 int main(int argc, char **argv) 441 int main(int argc, char **argv)
444 { 442 {
445 - Application app = Application::New(&argc, &argv); 443 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
446 444
447 RunTest(app); 445 RunTest(app);
448 446
examples/new-window/new-window-example.cpp
@@ -123,8 +123,6 @@ NewWindowController::NewWindowController( Application&amp; application ) @@ -123,8 +123,6 @@ NewWindowController::NewWindowController( Application&amp; application )
123 123
124 void NewWindowController::Create( Application& app ) 124 void NewWindowController::Create( Application& app )
125 { 125 {
126 - DemoHelper::RequestThemeChange();  
127 -  
128 Stage stage = Stage::GetCurrent(); 126 Stage stage = Stage::GetCurrent();
129 stage.SetBackgroundColor(Color::YELLOW); 127 stage.SetBackgroundColor(Color::YELLOW);
130 128
@@ -464,7 +462,7 @@ void RunTest(Application&amp; app) @@ -464,7 +462,7 @@ void RunTest(Application&amp; app)
464 462
465 int main(int argc, char **argv) 463 int main(int argc, char **argv)
466 { 464 {
467 - gApplication = Application::New(&argc, &argv); 465 + gApplication = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
468 RunTest(gApplication); 466 RunTest(gApplication);
469 467
470 return 0; 468 return 0;
examples/page-turn-view/page-turn-view-example.cpp
@@ -227,8 +227,6 @@ void PageTurnController::OnInit( Application&amp; app ) @@ -227,8 +227,6 @@ void PageTurnController::OnInit( Application&amp; app )
227 { 227 {
228 // The Init signal is received once ( only ) during the Application lifetime 228 // The Init signal is received once ( only ) during the Application lifetime
229 229
230 - DemoHelper::RequestThemeChange();  
231 -  
232 Stage::GetCurrent().KeyEventSignal().Connect(this, &PageTurnController::OnKeyEvent); 230 Stage::GetCurrent().KeyEventSignal().Connect(this, &PageTurnController::OnKeyEvent);
233 231
234 Stage stage = Stage::GetCurrent(); 232 Stage stage = Stage::GetCurrent();
@@ -348,7 +346,7 @@ void PageTurnController::OnPageFinishedPan( PageTurnView pageTurnView ) @@ -348,7 +346,7 @@ void PageTurnController::OnPageFinishedPan( PageTurnView pageTurnView )
348 // Entry point for applications 346 // Entry point for applications
349 int main( int argc, char **argv ) 347 int main( int argc, char **argv )
350 { 348 {
351 - Application app = Application::New(&argc, &argv); 349 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
352 PageTurnController test ( app ); 350 PageTurnController test ( app );
353 351
354 app.MainLoop(); 352 app.MainLoop();
examples/path-animation/path-animation.cpp
@@ -441,8 +441,6 @@ public: @@ -441,8 +441,6 @@ public:
441 */ 441 */
442 void Create( Application& application ) 442 void Create( Application& application )
443 { 443 {
444 - DemoHelper::RequestThemeChange();  
445 -  
446 // Get a handle to the stage: 444 // Get a handle to the stage:
447 Stage stage = Stage::GetCurrent(); 445 Stage stage = Stage::GetCurrent();
448 446
@@ -512,7 +510,7 @@ void RunTest( Application&amp; application ) @@ -512,7 +510,7 @@ void RunTest( Application&amp; application )
512 /** Entry point for Linux & Tizen applications */ 510 /** Entry point for Linux & Tizen applications */
513 int main( int argc, char **argv ) 511 int main( int argc, char **argv )
514 { 512 {
515 - Application application = Application::New( &argc, &argv ); 513 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
516 514
517 RunTest( application ); 515 RunTest( application );
518 516
examples/radial-menu/radial-menu-example.cpp
@@ -122,8 +122,6 @@ RadialMenuExample::~RadialMenuExample() @@ -122,8 +122,6 @@ RadialMenuExample::~RadialMenuExample()
122 122
123 void RadialMenuExample::OnInit(Application& app) 123 void RadialMenuExample::OnInit(Application& app)
124 { 124 {
125 - DemoHelper::RequestThemeChange();  
126 -  
127 Stage stage = Dali::Stage::GetCurrent(); 125 Stage stage = Dali::Stage::GetCurrent();
128 126
129 // The Init signal is received once (only) during the Application lifetime 127 // The Init signal is received once (only) during the Application lifetime
@@ -291,7 +289,7 @@ void RunTest(Application app) @@ -291,7 +289,7 @@ void RunTest(Application app)
291 // Entry point for Linux & Tizen applications 289 // Entry point for Linux & Tizen applications
292 int main(int argc, char **argv) 290 int main(int argc, char **argv)
293 { 291 {
294 - Application app = Application::New(&argc, &argv); 292 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
295 293
296 RunTest(app); 294 RunTest(app);
297 295
examples/refraction-effect/refraction-effect-example.cpp
@@ -320,8 +320,6 @@ private: @@ -320,8 +320,6 @@ private:
320 // The Init signal is received once (only) during the Application lifetime 320 // The Init signal is received once (only) during the Application lifetime
321 void Create(Application& application) 321 void Create(Application& application)
322 { 322 {
323 - DemoHelper::RequestThemeChange();  
324 -  
325 Stage stage = Stage::GetCurrent(); 323 Stage stage = Stage::GetCurrent();
326 mStageHalfSize = stage.GetSize() * 0.5f; 324 mStageHalfSize = stage.GetSize() * 0.5f;
327 325
@@ -658,7 +656,7 @@ RunTest(Application&amp; app) @@ -658,7 +656,7 @@ RunTest(Application&amp; app)
658 int 656 int
659 main(int argc, char **argv) 657 main(int argc, char **argv)
660 { 658 {
661 - Application app = Application::New(&argc, &argv); 659 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
662 660
663 RunTest(app); 661 RunTest(app);
664 662
examples/scripting/launcher.cpp
@@ -48,7 +48,6 @@ Launcher::Launcher( Dali::Application application, std::string layoutFileName, s @@ -48,7 +48,6 @@ Launcher::Launcher( Dali::Application application, std::string layoutFileName, s
48 mJSONFileName(layoutFileName ), 48 mJSONFileName(layoutFileName ),
49 mJavaScriptFileName( scriptFileName ) 49 mJavaScriptFileName( scriptFileName )
50 { 50 {
51 -  
52 mApplication.InitSignal().Connect( this, &Launcher::Create ); 51 mApplication.InitSignal().Connect( this, &Launcher::Create );
53 } 52 }
54 53
@@ -58,8 +57,6 @@ Launcher::~Launcher() @@ -58,8 +57,6 @@ Launcher::~Launcher()
58 57
59 void Launcher::Create( Dali::Application& application ) 58 void Launcher::Create( Dali::Application& application )
60 { 59 {
61 - DemoHelper::RequestThemeChange();  
62 -  
63 TextLabel textActor = TextLabel::New( "JSON & JavaScript Launcher..." ); 60 TextLabel textActor = TextLabel::New( "JSON & JavaScript Launcher..." );
64 61
65 // Reposition the actor 62 // Reposition the actor
examples/scripting/scripting-example.cpp
@@ -88,7 +88,7 @@ int main( int argc, char* argv[] ) @@ -88,7 +88,7 @@ int main( int argc, char* argv[] )
88 } 88 }
89 89
90 90
91 - Launcher daliApplication( Dali::Application::New( &argc, &argv ), jSONFileName, javaScriptFileName ); 91 + Launcher daliApplication( Dali::Application::New( &argc, &argv, DALI_DEMO_THEME_PATH ), jSONFileName, javaScriptFileName );
92 92
93 daliApplication.MainLoop(); 93 daliApplication.MainLoop();
94 94
examples/scroll-view/scroll-view-example.cpp
@@ -157,8 +157,6 @@ public: @@ -157,8 +157,6 @@ public:
157 */ 157 */
158 void OnInit(Application& app) 158 void OnInit(Application& app)
159 { 159 {
160 - DemoHelper::RequestThemeChange();  
161 -  
162 Stage stage = Dali::Stage::GetCurrent(); 160 Stage stage = Dali::Stage::GetCurrent();
163 stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); 161 stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
164 162
@@ -584,7 +582,7 @@ private: @@ -584,7 +582,7 @@ private:
584 582
585 int main(int argc, char **argv) 583 int main(int argc, char **argv)
586 { 584 {
587 - Application app = Application::New(&argc, &argv); 585 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
588 ExampleController test(app); 586 ExampleController test(app);
589 app.MainLoop(); 587 app.MainLoop();
590 return 0; 588 return 0;
examples/shadow-bone-lighting/shadow-bone-lighting-example.cpp
@@ -122,8 +122,6 @@ public: @@ -122,8 +122,6 @@ public:
122 */ 122 */
123 void Create(Application& app) 123 void Create(Application& app)
124 { 124 {
125 - DemoHelper::RequestThemeChange();  
126 -  
127 srand(0); // Want repeatable path 125 srand(0); // Want repeatable path
128 126
129 Stage::GetCurrent().KeyEventSignal().Connect(this, &TestApp::OnKeyEvent); 127 Stage::GetCurrent().KeyEventSignal().Connect(this, &TestApp::OnKeyEvent);
@@ -503,7 +501,7 @@ RunTest(Application&amp; app) @@ -503,7 +501,7 @@ RunTest(Application&amp; app)
503 int 501 int
504 main(int argc, char **argv) 502 main(int argc, char **argv)
505 { 503 {
506 - Application app = Application::New(&argc, &argv); 504 + Application app = Application::New(&argc, &argv, DALI_DEMO_THEME_PATH);
507 505
508 RunTest(app); 506 RunTest(app);
509 507
examples/size-negotiation/size-negotiation-example.cpp
@@ -159,8 +159,6 @@ public: @@ -159,8 +159,6 @@ public:
159 { 159 {
160 // The Init signal is received once (only) during the Application lifetime 160 // The Init signal is received once (only) during the Application lifetime
161 161
162 - DemoHelper::RequestThemeChange();  
163 -  
164 Stage stage = Stage::GetCurrent(); 162 Stage stage = Stage::GetCurrent();
165 163
166 // Respond to key events 164 // Respond to key events
@@ -1300,7 +1298,7 @@ void RunTest( Application&amp; application ) @@ -1300,7 +1298,7 @@ void RunTest( Application&amp; application )
1300 // 1298 //
1301 int main( int argc, char **argv ) 1299 int main( int argc, char **argv )
1302 { 1300 {
1303 - Application application = Application::New( &argc, &argv ); 1301 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
1304 1302
1305 RunTest( application ); 1303 RunTest( application );
1306 1304
examples/text-field/text-field-example.cpp
@@ -96,8 +96,6 @@ public: @@ -96,8 +96,6 @@ public:
96 */ 96 */
97 void Create( Application& application ) 97 void Create( Application& application )
98 { 98 {
99 - DemoHelper::RequestThemeChange();  
100 -  
101 Stage stage = Stage::GetCurrent(); 99 Stage stage = Stage::GetCurrent();
102 100
103 mTapGestureDetector = TapGestureDetector::New(); 101 mTapGestureDetector = TapGestureDetector::New();
@@ -239,7 +237,7 @@ void RunTest( Application&amp; application ) @@ -239,7 +237,7 @@ void RunTest( Application&amp; application )
239 /** Entry point for Linux & Tizen applications */ 237 /** Entry point for Linux & Tizen applications */
240 int main( int argc, char **argv ) 238 int main( int argc, char **argv )
241 { 239 {
242 - Application application = Application::New( &argc, &argv ); 240 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
243 241
244 RunTest( application ); 242 RunTest( application );
245 243
examples/text-label-emojis/text-label-emojis.cpp
@@ -143,7 +143,7 @@ void RunTest( Application&amp; application ) @@ -143,7 +143,7 @@ void RunTest( Application&amp; application )
143 // 143 //
144 int main( int argc, char **argv ) 144 int main( int argc, char **argv )
145 { 145 {
146 - Application application = Application::New( &argc, &argv ); 146 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
147 147
148 RunTest( application ); 148 RunTest( application );
149 149
examples/text-label-multi-language/text-label-multi-language-example.cpp
@@ -57,8 +57,6 @@ public: @@ -57,8 +57,6 @@ public:
57 */ 57 */
58 void Create( Application& application ) 58 void Create( Application& application )
59 { 59 {
60 - DemoHelper::RequestThemeChange();  
61 -  
62 Stage stage = Stage::GetCurrent(); 60 Stage stage = Stage::GetCurrent();
63 61
64 stage.KeyEventSignal().Connect(this, &TextLabelMultiLanguageExample::OnKeyEvent); 62 stage.KeyEventSignal().Connect(this, &TextLabelMultiLanguageExample::OnKeyEvent);
@@ -147,7 +145,7 @@ void RunTest( Application&amp; application ) @@ -147,7 +145,7 @@ void RunTest( Application&amp; application )
147 /** Entry point for Linux & Tizen applications */ 145 /** Entry point for Linux & Tizen applications */
148 int main( int argc, char **argv ) 146 int main( int argc, char **argv )
149 { 147 {
150 - Application application = Application::New( &argc, &argv ); 148 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
151 149
152 RunTest( application ); 150 RunTest( application );
153 151
examples/text-label/text-label-example.cpp
@@ -97,8 +97,6 @@ public: @@ -97,8 +97,6 @@ public:
97 */ 97 */
98 void Create( Application& application ) 98 void Create( Application& application )
99 { 99 {
100 - DemoHelper::RequestThemeChange();  
101 -  
102 Stage stage = Stage::GetCurrent(); 100 Stage stage = Stage::GetCurrent();
103 101
104 stage.KeyEventSignal().Connect(this, &TextLabelExample::OnKeyEvent); 102 stage.KeyEventSignal().Connect(this, &TextLabelExample::OnKeyEvent);
@@ -285,7 +283,7 @@ void RunTest( Application&amp; application ) @@ -285,7 +283,7 @@ void RunTest( Application&amp; application )
285 /** Entry point for Linux & Tizen applications */ 283 /** Entry point for Linux & Tizen applications */
286 int main( int argc, char **argv ) 284 int main( int argc, char **argv )
287 { 285 {
288 - Application application = Application::New( &argc, &argv ); 286 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
289 287
290 RunTest( application ); 288 RunTest( application );
291 289
examples/text-message-field/text-message-field-example.cpp
@@ -158,7 +158,7 @@ void RunTest( Application&amp; application ) @@ -158,7 +158,7 @@ void RunTest( Application&amp; application )
158 /** Entry point for Linux & Tizen applications */ 158 /** Entry point for Linux & Tizen applications */
159 int main( int argc, char **argv ) 159 int main( int argc, char **argv )
160 { 160 {
161 - Application application = Application::New( &argc, &argv ); 161 + Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH );
162 162
163 RunTest( application ); 163 RunTest( application );
164 164
shared/view.h
@@ -53,13 +53,6 @@ const float DEFAULT_TEXT_STYLE_POINT_SIZE( 8.0f ); @@ -53,13 +53,6 @@ const float DEFAULT_TEXT_STYLE_POINT_SIZE( 8.0f );
53 const Dali::Toolkit::Alignment::Padding DEFAULT_PLAY_PADDING(12.0f, 12.0f, 12.0f, 12.0f); 53 const Dali::Toolkit::Alignment::Padding DEFAULT_PLAY_PADDING(12.0f, 12.0f, 12.0f, 12.0f);
54 const Dali::Toolkit::Alignment::Padding DEFAULT_MODE_SWITCH_PADDING(8.0f, 8.0f, 8.0f, 8.0f); 54 const Dali::Toolkit::Alignment::Padding DEFAULT_MODE_SWITCH_PADDING(8.0f, 8.0f, 8.0f, 8.0f);
55 55
56 -void RequestThemeChange()  
57 -{  
58 - // Provide the stylesheet  
59 - Dali::Toolkit::StyleManager styleManager = Dali::Toolkit::StyleManager::Get();  
60 - styleManager.RequestThemeChange( DALI_DEMO_THEME_PATH );  
61 -}  
62 -  
63 float ScalePointSize(int pointSize) 56 float ScalePointSize(int pointSize)
64 { 57 {
65 Dali::Vector2 dpi = Dali::Stage::GetCurrent().GetDpi(); 58 Dali::Vector2 dpi = Dali::Stage::GetCurrent().GetDpi();