From 640d8d8979ac8cf2a828b06891480565946c76e2 Mon Sep 17 00:00:00 2001 From: Agnelo Vaz Date: Wed, 5 Aug 2015 10:47:00 +0100 Subject: [PATCH] TextField Demo not to use Demo style sheet --- examples/text-field/text-field-example.cpp | 5 +++-- resources/style/demo-theme.json | 28 +--------------------------- resources/style/mobile/demo-theme.json | 49 +------------------------------------------------ 3 files changed, 5 insertions(+), 77 deletions(-) diff --git a/examples/text-field/text-field-example.cpp b/examples/text-field/text-field-example.cpp index eae9fa1..ce4e212 100644 --- a/examples/text-field/text-field-example.cpp +++ b/examples/text-field/text-field-example.cpp @@ -114,12 +114,12 @@ public: TextField CreateTextField( const Vector2& stageSize, const std::string& text ) { TextField field = TextField::New(); + field.SetName("text-field"); field.SetAnchorPoint( AnchorPoint::TOP_LEFT ); field.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); field.SetProperty( TextField::Property::TEXT, text ); field.SetProperty( TextField::Property::TEXT_COLOR, Vector4( 0.0f, 1.0f, 1.0f, 1.0f ) ); // CYAN - field.SetProperty( TextField::Property::PRIMARY_CURSOR_COLOR, Color::WHITE ); field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Unnamed folder" ); field.SetProperty( TextField::Property::PLACEHOLDER_TEXT_FOCUSED, "Enter folder name." ); field.SetProperty( TextField::Property::DECORATION_BOUNDING_BOX, Rect( BORDER_WIDTH, BORDER_WIDTH, stageSize.width - BORDER_WIDTH*2, stageSize.height - BORDER_WIDTH*2 ) ); @@ -226,7 +226,8 @@ void RunTest( Application& application ) /** Entry point for Linux & Tizen applications */ int main( int argc, char **argv ) { - Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH ); + // DALI_DEMO_THEME_PATH not passed to Application so TextField example uses default Toolkit style sheet. + Application application = Application::New( &argc, &argv ); RunTest( application ); diff --git a/resources/style/demo-theme.json b/resources/style/demo-theme.json index 660df77..96649e7 100644 --- a/resources/style/demo-theme.json +++ b/resources/style/demo-theme.json @@ -43,33 +43,7 @@ distributing this software or its derivatives. { "point-size":13 }, - "textselectionpopuplabel": - { - "point-size":18 - }, - "textselectionpopup": - { - "popup-max-size":[400,100], - "option-divider-size":[2,0], - "popup-divider-color":[0.23,0.72,0.8,0.11], - "popup-icon-color":[1.0,1.0,1.0,1.0], - "popup-pressed-color":[0.24,0.72,0.8,0.9], - "background-image": { - "filename": "{DALI_IMAGE_DIR}selection-popup-bg.9.png" - } - }, - "textfield": - { - "font-family":"HelveticaNeue", - "font-style":"Regular", - "point-size":18, - "primary-cursor-color":[0.75,0.96,1.0,1.0], - "secondary-cursor-color":[1.0,0.71,0.9,1.0], - "selection-highlight-color":[0.75,0.96,1.0,1.0], - "grab-handle-image":"{DALI_IMAGE_DIR}cursor_handler_center.png", - "selection-handle-image-left":"{DALI_IMAGE_DIR}selection_handle_left.png", - "selection-handle-image-right":"{DALI_IMAGE_DIR}selection_handle_right.png" - }, + "scrollview": { "overshoot-effect-color":"B018" diff --git a/resources/style/mobile/demo-theme.json b/resources/style/mobile/demo-theme.json index 579bb81..1ba331d 100644 --- a/resources/style/mobile/demo-theme.json +++ b/resources/style/mobile/demo-theme.json @@ -64,54 +64,7 @@ distributing this software or its derivatives. { "point-size":10 }, - "textselectionpopuplabel": - { - "point-size":8 - }, - "textselectionpopup": - { - "popup-max-size":[400,100], - "option-divider-size":[2,0], - "popup-divider-color":[0.23,0.72,0.8,0.11], - "popup-icon-color":[1.0,1.0,1.0,1.0], - "popup-pressed-color":[0.24,0.72,0.8,0.11], - "background-image": { - "filename": "{DALI_IMAGE_DIR}selection-popup-bg.9.png" - } - }, - "textfield": - { - "font-family":"SamsungSans", - "font-style":"Regular", - "primary-cursor-color":[0.0,0.71,0.9,1.0], - "secondary-cursor-color":[0.0,0.71,0.9,1.0], - "selection-highlight-color":[0.75,0.96,1.0,1.0], - "grab-handle-image":"{DALI_IMAGE_DIR}cursor_handler_center.png", - "selection-handle-image-left":"{DALI_IMAGE_DIR}selection_handle_left.png", - "selection-handle-image-right":"{DALI_IMAGE_DIR}selection_handle_right.png" - }, - - "textfield-font-size-0": - { - "point-size":10 - }, - "textfield-font-size-1": - { - "point-size":10 - }, - "textfield-font-size-2": - { - "point-size":10 - }, - "textfield-font-size-3": - { - "point-size":10 - }, - "textfield-font-size-4": - { - "point-size":10 - }, - + "scrollview": { "overshoot-effect-color":"B018" -- libgit2 0.21.4