Modified to increase row's y when previous row is DEFAULT sublayout 68/95468/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Thu, 3 Nov 2016 09:48:24 +0000 (18:48 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Thu, 3 Nov 2016 09:48:24 +0000 (18:48 +0900)
Change-Id: Id3311cd5ab32bb453902bef89709d2fa4fe0c6d2

xmlresource/layout_parser.cpp

index 19142e9..ad65036 100644 (file)
@@ -146,6 +146,8 @@ using namespace std;
 
 #define LAYOUT_ROW_KEY_HINT_STRING_TAG "hint_string"
 
+#define LAYOUT_SUB_LAYOUT_DEFAULT_STRING "DEFAULT"
+
 #ifndef LOG_TAG
 #define LOG_TAG "LIBSCL_UI"
 #endif
@@ -827,8 +829,10 @@ LayoutParserImpl::parsing_layout_row_node(
         }
         child_node = child_node->next;
     }
-    /* Do not increase row_y position when this row belongs to specific sublayout */
-    if (row.sub_layout == NULL) {
+    /* Do not increase row_y position when this row belongs to specific sublayout other than "DEFAULT" */
+    static const char default_sub_layout_string[] = LAYOUT_SUB_LAYOUT_DEFAULT_STRING;
+    if (row.sub_layout == NULL ||
+        (row.sub_layout && strncmp(row.sub_layout, default_sub_layout_string, sizeof(default_sub_layout_string)) == 0)) {
         if (row_y) {
             *row_y = row.row_y + row.key_height + row.row_spacing;
         }