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
Ellipsis sometimes appears incorrect when mixed with RTL + LTR
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
rendering
/
view-model.cpp
diff --git
a/dali-toolkit/internal/text/rendering/view-model.cpp
b/dali-toolkit/internal/text/rendering/view-model.cpp
index
9be8215
..
3046f45
100755
(executable)
--- a/
dali-toolkit/internal/text/rendering/view-model.cpp
+++ b/
dali-toolkit/internal/text/rendering/view-model.cpp
@@
-153,6
+153,16
@@
const ColorIndex* const ViewModel::GetColorIndices() const
return mModel->GetColorIndices();
}
return mModel->GetColorIndices();
}
+const Vector4* const ViewModel::GetBackgroundColors() const
+{
+ return mModel->GetBackgroundColors();
+}
+
+const ColorIndex* const ViewModel::GetBackgroundColorIndices() const
+{
+ return mModel->GetBackgroundColorIndices();
+}
+
const Vector4& ViewModel::GetDefaultColor() const
{
return mModel->GetDefaultColor();
const Vector4& ViewModel::GetDefaultColor() const
{
return mModel->GetDefaultColor();
@@
-297,7
+307,7
@@
void ViewModel::ElideGlyphs()
// Need to reshape the glyph as the font may be different in size.
const GlyphInfo& ellipsisGlyph = fontClient.GetEllipsisGlyph( fontClient.GetPointSize( glyphToRemove.fontId ) );
// Need to reshape the glyph as the font may be different in size.
const GlyphInfo& ellipsisGlyph = fontClient.GetEllipsisGlyph( fontClient.GetPointSize( glyphToRemove.fontId ) );
- if( !firstPenSet )
+ if( !firstPenSet
|| EqualsZero( glyphToRemove.advance )
)
{
const Vector2& position = *( elidedPositionsBuffer + index );
{
const Vector2& position = *( elidedPositionsBuffer + index );
@@
-314,7
+324,10
@@
void ViewModel::ElideGlyphs()
removedGlypsWidth = -ellipsisGlyph.xBearing;
removedGlypsWidth = -ellipsisGlyph.xBearing;
- firstPenSet = true;
+ if( !EqualsZero( firstPenX ) )
+ {
+ firstPenSet = true;
+ }
}
removedGlypsWidth += std::min( glyphToRemove.advance, ( glyphToRemove.xBearing + glyphToRemove.width ) );
}
removedGlypsWidth += std::min( glyphToRemove.advance, ( glyphToRemove.xBearing + glyphToRemove.width ) );
@@
-332,7
+345,6
@@
void ViewModel::ElideGlyphs()
glyphInfo = ellipsisGlyph;
// Change the 'x' and 'y' position of the ellipsis glyph.
glyphInfo = ellipsisGlyph;
// Change the 'x' and 'y' position of the ellipsis glyph.
-
if( position.x > firstPenX )
{
position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;
if( position.x > firstPenX )
{
position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;