projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Framework for Font styles
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
controls
/
text-controls
/
text-label-impl.cpp
diff --git
a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
index
bb0607d
..
00ae80d
100644
(file)
--- a/
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
+++ b/
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
@@
-24,19
+24,14
@@
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/text/rendering-backend.h>
#include <dali-toolkit/internal/text/layouts/layout-engine.h>
#include <dali-toolkit/internal/text/rendering/text-backend.h>
#include <dali-toolkit/internal/text/layouts/layout-engine.h>
#include <dali-toolkit/internal/text/rendering/text-backend.h>
+#include <dali-toolkit/internal/styling/style-manager-impl.h>
using Dali::Toolkit::Text::LayoutEngine;
using Dali::Toolkit::Text::Backend;
using Dali::Toolkit::Text::LayoutEngine;
using Dali::Toolkit::Text::Backend;
-namespace
-{
-
-const unsigned int DEFAULT_RENDERING_BACKEND = 0;
-
-} // namespace
-
namespace Dali
{
namespace Dali
{
@@
-48,6
+43,11
@@
namespace Internal
namespace
{
namespace
{
+ const unsigned int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND;
+}
+
+namespace
+{
// Type registration
BaseHandle Create()
// Type registration
BaseHandle Create()
@@
-95,11
+95,11
@@
void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr
{
case Toolkit::TextLabel::Property::RENDERING_BACKEND:
{
{
case Toolkit::TextLabel::Property::RENDERING_BACKEND:
{
-
unsigned
int backend = value.Get< int >();
+ int backend = value.Get< int >();
if( impl.mRenderingBackend != backend )
{
if( impl.mRenderingBackend != backend )
{
- impl.mRenderingBackend =
static_cast< unsigned int >( backend )
;
+ impl.mRenderingBackend =
backend
;
impl.mRenderer.Reset();
impl.RequestTextRelayout();
}
impl.mRenderer.Reset();
impl.RequestTextRelayout();
}
@@
-199,8
+199,6
@@
Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde
impl.mController->GetText( text );
value = text;
}
impl.mController->GetText( text );
value = text;
}
-
- DALI_LOG_WARNING( "UTF-8 text representation was discarded\n" );
break;
}
case Toolkit::TextLabel::Property::MULTI_LINE:
break;
}
case Toolkit::TextLabel::Property::MULTI_LINE:
@@
-222,6
+220,11
@@
void TextLabel::OnInitialize()
mController = Text::Controller::New( *this );
}
mController = Text::Controller::New( *this );
}
+void TextLabel::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange change )
+{
+ GetImpl( styleManager ).ApplyThemeStyle( Toolkit::Control( GetOwner() ) );
+}
+
Vector3 TextLabel::GetNaturalSize()
{
return mController->GetNaturalSize();
Vector3 TextLabel::GetNaturalSize()
{
return mController->GetNaturalSize();
@@
-268,7
+271,7
@@
void TextLabel::RequestTextRelayout()
}
TextLabel::TextLabel()
}
TextLabel::TextLabel()
-: Control( ControlBehaviour(
CONTROL_BEHAVIOUR_NONE
) ),
+: Control( ControlBehaviour(
REQUIRES_STYLE_CHANGE_SIGNALS
) ),
mRenderingBackend( DEFAULT_RENDERING_BACKEND )
{
}
mRenderingBackend( DEFAULT_RENDERING_BACKEND )
{
}