Ability to build from different Style folders 35/44935/5
authorAgnelo Vaz <agnelo.vaz@samsung.com>
Wed, 29 Jul 2015 13:39:13 +0000 (14:39 +0100)
committerAgnelo Vaz <agnelo.vaz@samsung.com>
Thu, 30 Jul 2015 15:36:01 +0000 (16:36 +0100)
* Added a "reference" folder which contains the default style
* Althernative folders can be added to the style folder
* Build system can be configured to use defined folder for style file.

- spec file currently only uses reference folder but will be configurable from build system in future

Change-Id: Ia24efc50112a03d0048d24665d0f5ce6b2b01c08

build/tizen/configure.ac
dali-toolkit/styles/480x800/dali-toolkit-default-theme.json [moved from dali-toolkit/styles/mobile/dali-toolkit-default-theme.json with 88% similarity]
dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json [moved from dali-toolkit/styles/dali-toolkit-default-theme.json with 62% similarity]
packaging/dali-toolkit.spec

index a0b795d..9378eed 100644 (file)
@@ -84,6 +84,13 @@ AC_ARG_ENABLE([profile],
               [dali_profile=$enableval],
               [dali_profile=UBUNTU])
 
               [dali_profile=$enableval],
               [dali_profile=UBUNTU])
 
+# Tizen Style Folder
+AC_ARG_WITH(style,
+              [AC_HELP_STRING([--with-style],
+                            [Select the style folder to use])],
+              [dali_style=$withval],
+              [dali_style=480x800])
+
 # Ensure valid profile selected
 if test "x$dali_profile" != "xUBUNTU" -a "x$dali_profile" != "xMOBILE" -a "x$dali_profile" != "xWEARABLE" -a "x$dali_profile" != "xTV" ; then
   AC_MSG_ERROR([$enable_profile is an invalid profile])
 # Ensure valid profile selected
 if test "x$dali_profile" != "xUBUNTU" -a "x$dali_profile" != "xMOBILE" -a "x$dali_profile" != "xWEARABLE" -a "x$dali_profile" != "xTV" ; then
   AC_MSG_ERROR([$enable_profile is an invalid profile])
@@ -103,14 +110,9 @@ fi
 
 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDALI_PROFILE_${dali_profile}"
 
 
 DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDALI_PROFILE_${dali_profile}"
 
-# Style paths
-if test "x$dali_profile" = "xUBUNTU"; then
-  STYLE_DIR=../../../dali-toolkit/styles
-fi
-
-if test "x$dali_profile" = "xMOBILE"; then
-  STYLE_DIR=../../../dali-toolkit/styles/mobile
-fi
+# Style folder
+STYLE_DIR=../../../dali-toolkit/styles
+STYLE_DIR=$STYLE_DIR/$dali_style
 
 AC_SUBST(STYLE_DIR)
 
 
 AC_SUBST(STYLE_DIR)
 
@@ -177,4 +179,6 @@ Configuration
   Profile:                          $dali_profile
   Data Dir (Read/Write):            $dataReadWriteDir
   Data Dir (Read Only):             $dataReadOnlyDir
   Profile:                          $dali_profile
   Data Dir (Read/Write):            $dataReadWriteDir
   Data Dir (Read Only):             $dataReadOnlyDir
+  Style Dir                         $STYLE_DIR
+  Style                             $dali_style
 "
 "
@@ -23,8 +23,9 @@ distributing this software or its derivatives.
 
 //******************************************************************************
 //
 
 //******************************************************************************
 //
-// Default style theme for Tizen dark theme, The values should come from
-// UX design document.
+// Default Reference style theme for a 480x800 resolution, The values determined by UX design specification.
+// This file can be copied to a new folder within the styles/ directory and amended with new default values.
+// Can be overriden if StyleManager applies another style sheet.
 //
 //******************************************************************************
 
 //
 //******************************************************************************
 
@@ -33,8 +34,7 @@ distributing this software or its derivatives.
   {
     "textlabel":
     {
   {
     "textlabel":
     {
-      "font-family":"SamsungSans",
-      "font-style":"Regular"
+      "point-size":18
     },
 
     "textlabel-font-size-0":
     },
 
     "textlabel-font-size-0":
@@ -58,11 +58,9 @@ distributing this software or its derivatives.
       "point-size":25
     },
 
       "point-size":25
     },
 
-
     "textfield":
     {
     "textfield":
     {
-      "font-family":"SamsungSans",
-      "font-style":"Regular",
+      "point-size":18,
       "primary-cursor-color":[1.0,0.71,0.9,1.0],
       "secondary-cursor-color":[1.0,0.71,0.9,1.0],
       "selection-highlight-color":[0.75,0.96,1.0,1.0],
       "primary-cursor-color":[1.0,0.71,0.9,1.0],
       "secondary-cursor-color":[1.0,0.71,0.9,1.0],
       "selection-highlight-color":[0.75,0.96,1.0,1.0],
@@ -91,10 +89,6 @@ distributing this software or its derivatives.
     {
       "point-size":10
     },
     {
       "point-size":10
     },
-    "textselectionpopuplabel":
-    {
-      "point-size":8
-    },
     "textselectionpopup":
     {
       "popup-max-size":[400,100],
     "textselectionpopup":
     {
       "popup-max-size":[400,100],
@@ -23,8 +23,9 @@ distributing this software or its derivatives.
 
 //******************************************************************************
 //
 
 //******************************************************************************
 //
-// Default style theme for Tizen dark theme, The values should come from
-// UX design document.
+// Default Reference style theme for a 720x1280 resolution, The values determined by UX design specification.
+// This file can be copied to a new folder within the styles/ directory and amended with new default values.
+// Can be overriden if StyleManager applies another style sheet.
 //
 //******************************************************************************
 
 //
 //******************************************************************************
 
@@ -33,17 +34,64 @@ distributing this software or its derivatives.
   {
     "textlabel":
     {
   {
     "textlabel":
     {
-      "font-family":"HelveticaNeue",
-      "font-style":"Regular",
       "point-size":18
     },
       "point-size":18
     },
-    "textselectionpopuplabel":
+
+    "textlabel-font-size-0":
     {
     {
-      "point-size":18
+      "point-size":8
+    },
+    "textlabel-font-size-1":
+    {
+      "point-size":10
+    },
+    "textlabel-font-size-2":
+    {
+      "point-size":15
+    },
+    "textlabel-font-size-3":
+    {
+      "point-size":19
+    },
+    "textlabel-font-size-4":
+    {
+      "point-size":25
+    },
+
+    "textfield":
+    {
+      "point-size":28,
+      "primary-cursor-color":[1.0,0.71,0.9,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"
+    },
+
+    "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
     },
     "textselectionpopup":
     {
     },
     "textselectionpopup":
     {
-      "popup-max-size":[400,100],
+      "popup-max-size":[656,72],
       "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],
       "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],
@@ -52,18 +100,6 @@ distributing this software or its derivatives.
         "filename": "{DALI_IMAGE_DIR}selection-popup-bg.9.png"
         }
     },
         "filename": "{DALI_IMAGE_DIR}selection-popup-bg.9.png"
         }
     },
-    "textfield":
-    {
-      "font-family":"HelveticaNeue",
-      "font-style":"Regular",
-      "point-size":18,
-      "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"
-    },
     "scrollview":
     {
       "overshoot-effect-color":"B018"
     "scrollview":
     {
       "overshoot-effect-color":"B018"
index ffecd5f..1c54967 100644 (file)
@@ -21,6 +21,12 @@ BuildRequires:  pkgconfig(dali-core)
 #############################
 
 %define dali_toolkit_profile MOBILE
 #############################
 
 %define dali_toolkit_profile MOBILE
+%define dali_style_folder 720x1280
+# dali_style to be provided by build system as with dali_toolkit_profile or by passing --define 'dali_style 470x800' to the rpm build command
+
+%if "%{?dali_style}"
+  %define dali_style_folder %{dali_style}
+%endif
 
 # Further resource locations profiles can be provided here otherwise MOBILE will be used
 %if "%{tizen_profile_name}" == "mobile"
 
 # Further resource locations profiles can be provided here otherwise MOBILE will be used
 %if "%{tizen_profile_name}" == "mobile"
@@ -67,7 +73,7 @@ cd %{_builddir}/dali-toolkit-%{version}/build/tizen
 autoreconf --install
 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
 autoreconf --install
 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
-%configure --enable-profile=%{dali_toolkit_profile}
+%configure --enable-profile=%{dali_toolkit_profile} --with-style=%{dali_style_folder}
 make %{?jobs:-j%jobs}
 
 ##############################
 make %{?jobs:-j%jobs}
 
 ##############################