SET(LOCAL_IMAGES_DIR ${RESOURCE_DIR}/images)
SET(LOCAL_MODELS_DIR ${RESOURCE_DIR}/models)
SET(LOCAL_SCRIPTS_DIR ${RESOURCE_DIR}/scripts)
+IF(NOT DEFINED LOCAL_STYLE_DIR)
+ SET(LOCAL_STYLE_DIR ${RESOURCE_DIR}/style)
+ENDIF()
SET(IMAGES_DIR ${APP_DATA_DIR}/images/)
SET(MODELS_DIR ${APP_DATA_DIR}/models/)
SET(SCRIPTS_DIR ${APP_DATA_DIR}/scripts/)
+SET(STYLE_DIR ${APP_DATA_DIR}/style/)
IF(NOT DEFINED LOCALE_DIR)
SET(LOCALE_DIR ${PREFIX}/share/locale)
SET(DALI_IMAGE_DIR \\"${IMAGES_DIR}\\")
SET(DALI_MODEL_DIR \\"${MODELS_DIR}\\")
SET(DALI_SCRIPT_DIR \\"${SCRIPTS_DIR}\\")
+SET(DALI_STYLE_DIR \\"${STYLE_DIR}\\")
+SET(DALI_DEMO_THEME_PATH \\"${STYLE_DIR}/demo-theme.json\\")
SET(DALI_EXAMPLE_BIN \\"${BINDIR}/\\")
SET(DALI_LOCALE_DIR \\"${LOCALE_DIR}\\")
SET(DALI_LANG \\"${LANG}\\")
INSTALL(FILES ${LOCAL_SCRIPTS_DIR}/${flag} DESTINATION ${SCRIPTS_DIR})
ENDFOREACH(flag)
+INSTALL(FILES ${LOCAL_STYLE_DIR}/demo-theme.json DESTINATION ${STYLE_DIR})
+
SET(PKG_LIST dali
dali-toolkit)
SET(REQUIRED_CFLAGS "${REQUIRED_CFLAGS} ${flag}")
ENDFOREACH(flag)
-SET(DALI_DEMO_CFLAGS "-DDALI_IMAGE_DIR=${DALI_IMAGE_DIR} -DDALI_MODEL_DIR=${DALI_MODEL_DIR} -DDALI_SCRIPT_DIR=${DALI_SCRIPT_DIR} -DDALI_EXAMPLE_BIN=${DALI_EXAMPLE_BIN} -DDALI_LOCALE_DIR=${DALI_LOCALE_DIR} -fvisibility=hidden -DHIDE_DALI_INTERNALS -DDALI_LANG=${DALI_LANG}")
+SET(DALI_DEMO_CFLAGS "-DDALI_IMAGE_DIR=${DALI_IMAGE_DIR} -DDALI_MODEL_DIR=${DALI_MODEL_DIR} -DDALI_SCRIPT_DIR=${DALI_SCRIPT_DIR} -DDALI_DEMO_THEME_PATH=${DALI_DEMO_THEME_PATH} -DDALI_EXAMPLE_BIN=${DALI_EXAMPLE_BIN} -DDALI_LOCALE_DIR=${DALI_LOCALE_DIR} -fvisibility=hidden -DHIDE_DALI_INTERNALS -DDALI_LANG=${DALI_LANG}")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${REQUIRED_CFLAGS} ${DALI_DEMO_CFLAGS} -Werror -Wall")
SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
*
*/
+// EXTERNAL INCLUDES
+#include <dali/dali.h>
+
+// INTERNAL INCLUDES
#include "dali-table-view.h"
#include "shared/dali-demo-strings.h"
Application app = Application::New(&argc, &argv);
+ // Create the demo launcher
DaliTableView demo(app);
demo.AddExample(Example("bubble-effect.example", DALI_DEMO_STR_TITLE_BUBBLES));
demo.AddExample(Example("text-label-emojis.example", DALI_DEMO_STR_TITLE_EMOJI_TEXT));
demo.AddExample(Example("animated-shapes.example", DALI_DEMO_STR_TITLE_ANIMATED_SHAPES));
demo.AddExample(Example("path-animation.example", DALI_DEMO_STR_TITLE_PATH_ANIMATION));
+
+ // Start the event loop
app.MainLoop();
return 0;
#include <algorithm>
#include <sstream>
#include <unistd.h>
+#include <dali-toolkit/public-api/styling/style-manager.h>
// INTERNAL INCLUDES
#include "shared/view.h"
void DaliTableView::Initialize( Application& application )
{
+ // Provide the stylesheet
+ StyleManager styleManager = StyleManager::Get();
+ styleManager.RequestThemeChange( DALI_DEMO_THEME_PATH );
+
Stage::GetCurrent().KeyEventSignal().Connect( this, &DaliTableView::OnKeyEvent );
const Vector2 stageSize = Stage::GetCurrent().GetSize();
TextLabel label = TextLabel::New();
label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
label.SetSize( parentSize );
+ label.SetProperty( Control::Property::STYLE_NAME, "launcherlabel" );
label.SetProperty( TextLabel::Property::MULTI_LINE, true );
label.SetProperty( TextLabel::Property::TEXT, title );
label.SetProperty( TextLabel::Property::ALIGNMENT, "CENTER" );
%define dali_icon_dir /usr/share/icons/
%define smack_rule_dir /etc/smack/accesses2.d/
%define locale_dir %{dali_app_ro_dir}/res/locale
+%define local_style_dir ../../resources/style/mobile
##############################
# Build
CXXFLAGS+=" -D_ARCH_ARM_"
%endif
-cd %{_builddir}/%{name}-%{version}/build/tizen && cmake -DDALI_APP_DIR=%{dali_app_ro_dir} -DLOCALE_DIR=%{locale_dir} .
+cd %{_builddir}/%{name}-%{version}/build/tizen && cmake -DDALI_APP_DIR=%{dali_app_ro_dir} -DLOCALE_DIR=%{locale_dir} -DLOCAL_STYLE_DIR=%{local_style_dir} .
make %{?jobs:-j%jobs}
%{dali_app_ro_dir}/images/*
%{dali_app_ro_dir}/models/*
%{dali_app_ro_dir}/scripts/*
+%{dali_app_ro_dir}/style/*
%{dali_xml_file_dir}/%{name}.xml
%{dali_icon_dir}/*
%{locale_dir}/*
--- /dev/null
+/*
+Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+
+This file is part of Dali Toolkit
+
+PROPRIETARY/CONFIDENTIAL
+
+This software is the confidential and proprietary information of
+SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
+disclose such Confidential Information and shall use it only in
+accordance with the terms of the license agreement you entered
+into with SAMSUNG ELECTRONICS.
+
+SAMSUNG make no representations or warranties about the suitability
+of the software, either express or implied, including but not limited
+to the implied warranties of merchantability, fitness for a particular
+purpose, or non-infringement. SAMSUNG shall not be liable for any
+damages suffered by licensee as a result of using, modifying or
+distributing this software or its derivatives.
+*/
+
+{
+ "styles":
+ {
+ "textlabel":
+ {
+ "font-family":"HelveticaNeue",
+ "font-style":"Regular"
+ },
+
+ "launcherlabel":
+ {
+ "point-size":18
+ },
+
+ "toolbarlabel":
+ {
+ "point-size":18
+ },
+
+ "textfield":
+ {
+ "font-family":"HelveticaNeue",
+ "font-style":"Regular",
+ "point-size":18
+ },
+
+ "scrollview":
+ {
+ "overshoot-effect-color":"B018"
+ }
+ }
+}
--- /dev/null
+/*
+Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+
+This file is part of Dali Toolkit
+
+PROPRIETARY/CONFIDENTIAL
+
+This software is the confidential and proprietary information of
+SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
+disclose such Confidential Information and shall use it only in
+accordance with the terms of the license agreement you entered
+into with SAMSUNG ELECTRONICS.
+
+SAMSUNG make no representations or warranties about the suitability
+of the software, either express or implied, including but not limited
+to the implied warranties of merchantability, fitness for a particular
+purpose, or non-infringement. SAMSUNG shall not be liable for any
+damages suffered by licensee as a result of using, modifying or
+distributing this software or its derivatives.
+*/
+
+{
+ "styles":
+ {
+ "textlabel":
+ {
+ "font-family":"SamsungSans",
+ "font-style":"Regular"
+ },
+
+ "textlabel-font-size-0":
+ {
+ "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
+ },
+
+ "launcherlabel":
+ {
+ "point-size":10
+ },
+
+ "toolbarlabel":
+ {
+ "point-size":10
+ },
+
+ "textfield":
+ {
+ "font-family":"SamsungSans",
+ "font-style":"Regular"
+ },
+
+ "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"
+ }
+ }
+}
label.SetAnchorPoint( Dali::AnchorPoint::TOP_LEFT );
label.SetSize( stage.GetSize().width, style.mToolBarHeight );
label.SetDrawMode( Dali::DrawMode::OVERLAY );
+ label.SetProperty( Dali::Toolkit::Control::Property::STYLE_NAME, "toolbarlabel" );
label.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT, title );
label.SetProperty( Dali::Toolkit::TextLabel::Property::ALIGNMENT, "CENTER" );
- label.SetProperty( Dali::Toolkit::TextLabel::Property::FONT_FAMILY, DEFAULT_TEXT_STYLE_FONT_FAMILY );
- label.SetProperty( Dali::Toolkit::TextLabel::Property::FONT_STYLE, DEFAULT_TEXT_STYLE_FONT_STYLE );
- label.SetProperty( Dali::Toolkit::TextLabel::Property::POINT_SIZE, ScalePointSize(DEFAULT_TEXT_STYLE_POINT_SIZE) );
label.SetColor( DEFAULT_TEXT_STYLE_COLOR );
toolBarLayer.Add( label );
}