Commit 640d8d8979ac8cf2a828b06891480565946c76e2
1 parent
9ca6b6d8
TextField Demo not to use Demo style sheet
* TextField entries removed from demo style sheets Once demo styles can be merged with toolkit styles then some of the removed entries can be put back and demo style sheets used Change-Id: I0047eea7a6bc51177225e20535e413dea3a76fe7 Signed-off-by: Agnelo Vaz <agnelo.vaz@samsung.com>
Showing
3 changed files
with
5 additions
and
77 deletions
examples/text-field/text-field-example.cpp
| @@ -114,12 +114,12 @@ public: | @@ -114,12 +114,12 @@ public: | ||
| 114 | TextField CreateTextField( const Vector2& stageSize, const std::string& text ) | 114 | TextField CreateTextField( const Vector2& stageSize, const std::string& text ) |
| 115 | { | 115 | { |
| 116 | TextField field = TextField::New(); | 116 | TextField field = TextField::New(); |
| 117 | + field.SetName("text-field"); | ||
| 117 | field.SetAnchorPoint( AnchorPoint::TOP_LEFT ); | 118 | field.SetAnchorPoint( AnchorPoint::TOP_LEFT ); |
| 118 | field.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | 119 | field.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 119 | field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); | 120 | field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT ); |
| 120 | field.SetProperty( TextField::Property::TEXT, text ); | 121 | field.SetProperty( TextField::Property::TEXT, text ); |
| 121 | field.SetProperty( TextField::Property::TEXT_COLOR, Vector4( 0.0f, 1.0f, 1.0f, 1.0f ) ); // CYAN | 122 | field.SetProperty( TextField::Property::TEXT_COLOR, Vector4( 0.0f, 1.0f, 1.0f, 1.0f ) ); // CYAN |
| 122 | - field.SetProperty( TextField::Property::PRIMARY_CURSOR_COLOR, Color::WHITE ); | ||
| 123 | field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Unnamed folder" ); | 123 | field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Unnamed folder" ); |
| 124 | field.SetProperty( TextField::Property::PLACEHOLDER_TEXT_FOCUSED, "Enter folder name." ); | 124 | field.SetProperty( TextField::Property::PLACEHOLDER_TEXT_FOCUSED, "Enter folder name." ); |
| 125 | field.SetProperty( TextField::Property::DECORATION_BOUNDING_BOX, Rect<int>( BORDER_WIDTH, BORDER_WIDTH, stageSize.width - BORDER_WIDTH*2, stageSize.height - BORDER_WIDTH*2 ) ); | 125 | field.SetProperty( TextField::Property::DECORATION_BOUNDING_BOX, Rect<int>( BORDER_WIDTH, BORDER_WIDTH, stageSize.width - BORDER_WIDTH*2, stageSize.height - BORDER_WIDTH*2 ) ); |
| @@ -226,7 +226,8 @@ void RunTest( Application& application ) | @@ -226,7 +226,8 @@ void RunTest( Application& application ) | ||
| 226 | /** Entry point for Linux & Tizen applications */ | 226 | /** Entry point for Linux & Tizen applications */ |
| 227 | int main( int argc, char **argv ) | 227 | int main( int argc, char **argv ) |
| 228 | { | 228 | { |
| 229 | - Application application = Application::New( &argc, &argv, DALI_DEMO_THEME_PATH ); | 229 | + // DALI_DEMO_THEME_PATH not passed to Application so TextField example uses default Toolkit style sheet. |
| 230 | + Application application = Application::New( &argc, &argv ); | ||
| 230 | 231 | ||
| 231 | RunTest( application ); | 232 | RunTest( application ); |
| 232 | 233 |
resources/style/demo-theme.json
| @@ -43,33 +43,7 @@ distributing this software or its derivatives. | @@ -43,33 +43,7 @@ distributing this software or its derivatives. | ||
| 43 | { | 43 | { |
| 44 | "point-size":13 | 44 | "point-size":13 |
| 45 | }, | 45 | }, |
| 46 | - "textselectionpopuplabel": | ||
| 47 | - { | ||
| 48 | - "point-size":18 | ||
| 49 | - }, | ||
| 50 | - "textselectionpopup": | ||
| 51 | - { | ||
| 52 | - "popup-max-size":[400,100], | ||
| 53 | - "option-divider-size":[2,0], | ||
| 54 | - "popup-divider-color":[0.23,0.72,0.8,0.11], | ||
| 55 | - "popup-icon-color":[1.0,1.0,1.0,1.0], | ||
| 56 | - "popup-pressed-color":[0.24,0.72,0.8,0.9], | ||
| 57 | - "background-image": { | ||
| 58 | - "filename": "{DALI_IMAGE_DIR}selection-popup-bg.9.png" | ||
| 59 | - } | ||
| 60 | - }, | ||
| 61 | - "textfield": | ||
| 62 | - { | ||
| 63 | - "font-family":"HelveticaNeue", | ||
| 64 | - "font-style":"Regular", | ||
| 65 | - "point-size":18, | ||
| 66 | - "primary-cursor-color":[0.75,0.96,1.0,1.0], | ||
| 67 | - "secondary-cursor-color":[1.0,0.71,0.9,1.0], | ||
| 68 | - "selection-highlight-color":[0.75,0.96,1.0,1.0], | ||
| 69 | - "grab-handle-image":"{DALI_IMAGE_DIR}cursor_handler_center.png", | ||
| 70 | - "selection-handle-image-left":"{DALI_IMAGE_DIR}selection_handle_left.png", | ||
| 71 | - "selection-handle-image-right":"{DALI_IMAGE_DIR}selection_handle_right.png" | ||
| 72 | - }, | 46 | + |
| 73 | "scrollview": | 47 | "scrollview": |
| 74 | { | 48 | { |
| 75 | "overshoot-effect-color":"B018" | 49 | "overshoot-effect-color":"B018" |
resources/style/mobile/demo-theme.json
| @@ -64,54 +64,7 @@ distributing this software or its derivatives. | @@ -64,54 +64,7 @@ distributing this software or its derivatives. | ||
| 64 | { | 64 | { |
| 65 | "point-size":10 | 65 | "point-size":10 |
| 66 | }, | 66 | }, |
| 67 | - "textselectionpopuplabel": | ||
| 68 | - { | ||
| 69 | - "point-size":8 | ||
| 70 | - }, | ||
| 71 | - "textselectionpopup": | ||
| 72 | - { | ||
| 73 | - "popup-max-size":[400,100], | ||
| 74 | - "option-divider-size":[2,0], | ||
| 75 | - "popup-divider-color":[0.23,0.72,0.8,0.11], | ||
| 76 | - "popup-icon-color":[1.0,1.0,1.0,1.0], | ||
| 77 | - "popup-pressed-color":[0.24,0.72,0.8,0.11], | ||
| 78 | - "background-image": { | ||
| 79 | - "filename": "{DALI_IMAGE_DIR}selection-popup-bg.9.png" | ||
| 80 | - } | ||
| 81 | - }, | ||
| 82 | - "textfield": | ||
| 83 | - { | ||
| 84 | - "font-family":"SamsungSans", | ||
| 85 | - "font-style":"Regular", | ||
| 86 | - "primary-cursor-color":[0.0,0.71,0.9,1.0], | ||
| 87 | - "secondary-cursor-color":[0.0,0.71,0.9,1.0], | ||
| 88 | - "selection-highlight-color":[0.75,0.96,1.0,1.0], | ||
| 89 | - "grab-handle-image":"{DALI_IMAGE_DIR}cursor_handler_center.png", | ||
| 90 | - "selection-handle-image-left":"{DALI_IMAGE_DIR}selection_handle_left.png", | ||
| 91 | - "selection-handle-image-right":"{DALI_IMAGE_DIR}selection_handle_right.png" | ||
| 92 | - }, | ||
| 93 | - | ||
| 94 | - "textfield-font-size-0": | ||
| 95 | - { | ||
| 96 | - "point-size":10 | ||
| 97 | - }, | ||
| 98 | - "textfield-font-size-1": | ||
| 99 | - { | ||
| 100 | - "point-size":10 | ||
| 101 | - }, | ||
| 102 | - "textfield-font-size-2": | ||
| 103 | - { | ||
| 104 | - "point-size":10 | ||
| 105 | - }, | ||
| 106 | - "textfield-font-size-3": | ||
| 107 | - { | ||
| 108 | - "point-size":10 | ||
| 109 | - }, | ||
| 110 | - "textfield-font-size-4": | ||
| 111 | - { | ||
| 112 | - "point-size":10 | ||
| 113 | - }, | ||
| 114 | - | 67 | + |
| 115 | "scrollview": | 68 | "scrollview": |
| 116 | { | 69 | { |
| 117 | "overshoot-effect-color":"B018" | 70 | "overshoot-effect-color":"B018" |