From: Agnelo Vaz Date: Wed, 29 Jul 2015 13:39:13 +0000 (+0100) Subject: Ability to build from different Style folders X-Git-Tag: dali_1.0.52~9^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=1409185a3aa913c015e5f4eabefd28267ef54bcd;hp=9c9458b75ef860194181a29ae8ca2d216b0a6fed Ability to build from different Style folders * 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 --- diff --git a/build/tizen/configure.ac b/build/tizen/configure.ac index a0b795d..9378eed 100644 --- a/build/tizen/configure.ac +++ b/build/tizen/configure.ac @@ -84,6 +84,13 @@ AC_ARG_ENABLE([profile], [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]) @@ -103,14 +110,9 @@ fi 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) @@ -177,4 +179,6 @@ Configuration Profile: $dali_profile Data Dir (Read/Write): $dataReadWriteDir Data Dir (Read Only): $dataReadOnlyDir + Style Dir $STYLE_DIR + Style $dali_style " diff --git a/dali-toolkit/styles/mobile/dali-toolkit-default-theme.json b/dali-toolkit/styles/480x800/dali-toolkit-default-theme.json similarity index 88% rename from dali-toolkit/styles/mobile/dali-toolkit-default-theme.json rename to dali-toolkit/styles/480x800/dali-toolkit-default-theme.json index 8eeec51..8a0d1ee 100644 --- a/dali-toolkit/styles/mobile/dali-toolkit-default-theme.json +++ b/dali-toolkit/styles/480x800/dali-toolkit-default-theme.json @@ -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": { - "font-family":"SamsungSans", - "font-style":"Regular" + "point-size":18 }, "textlabel-font-size-0": @@ -58,11 +58,9 @@ distributing this software or its derivatives. "point-size":25 }, - "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], @@ -91,10 +89,6 @@ distributing this software or its derivatives. { "point-size":10 }, - "textselectionpopuplabel": - { - "point-size":8 - }, "textselectionpopup": { "popup-max-size":[400,100], diff --git a/dali-toolkit/styles/dali-toolkit-default-theme.json b/dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json similarity index 62% rename from dali-toolkit/styles/dali-toolkit-default-theme.json rename to dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json index 014efd4..d9d86e5 100644 --- a/dali-toolkit/styles/dali-toolkit-default-theme.json +++ b/dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json @@ -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": { - "font-family":"HelveticaNeue", - "font-style":"Regular", "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": { - "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], @@ -52,18 +100,6 @@ distributing this software or its derivatives. "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" diff --git a/packaging/dali-toolkit.spec b/packaging/dali-toolkit.spec index ffecd5f..1c54967 100644 --- a/packaging/dali-toolkit.spec +++ b/packaging/dali-toolkit.spec @@ -21,6 +21,12 @@ BuildRequires: pkgconfig(dali-core) ############################# %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" @@ -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 -%configure --enable-profile=%{dali_toolkit_profile} +%configure --enable-profile=%{dali_toolkit_profile} --with-style=%{dali_style_folder} make %{?jobs:-j%jobs} ##############################