The calculated text size is used in atlas renderer.
When the text is all white space, partial render issue occurs because the width is 0.
To avoid issue, do not remove the white space size in hidden input mode.
Change-Id: Id92becdb0103fa6dee20c5cd272ee3d4314121c6
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
bool isAutoScroll = false;
bool isAutoScrollMaxTextureExceeded = false;
bool isAutoScroll = false;
bool isAutoScrollMaxTextureExceeded = false;
+ bool isHiddenInputEnabled = false;
layoutEngine.LayoutText(layoutParameters,
layoutSize,
false,
isAutoScroll,
isAutoScrollMaxTextureExceeded,
layoutEngine.LayoutText(layoutParameters,
layoutSize,
false,
isAutoScroll,
isAutoScrollMaxTextureExceeded,
ellipsisPosition);
if(options.align)
ellipsisPosition);
if(options.align)
bool isAutoScroll = false;
bool isAutoScrollMaxTextureExceeded = false;
bool isAutoScroll = false;
bool isAutoScrollMaxTextureExceeded = false;
+ bool isHiddenInputEnabled = false;
const bool updated = engine.LayoutText(layoutParameters,
layoutSize,
data.ellipsis,
isAutoScroll,
isAutoScrollMaxTextureExceeded,
const bool updated = engine.LayoutText(layoutParameters,
layoutSize,
data.ellipsis,
isAutoScroll,
isAutoScrollMaxTextureExceeded,
DevelText::EllipsisPosition::END);
// 4) Compare the results.
DevelText::EllipsisPosition::END);
// 4) Compare the results.
bool isAutoScroll = false;
bool isAutoScrollMaxTextureExceeded = false;
bool isAutoScroll = false;
bool isAutoScrollMaxTextureExceeded = false;
+ bool isHiddenInputEnabled = false;
const bool updated = engine.LayoutText(layoutParameters,
layoutSize,
data.ellipsis,
isAutoScroll,
isAutoScrollMaxTextureExceeded,
const bool updated = engine.LayoutText(layoutParameters,
layoutSize,
data.ellipsis,
isAutoScroll,
isAutoScrollMaxTextureExceeded,
data.ellipsisPosition);
// 4) Compare the results.
data.ellipsisPosition);
// 4) Compare the results.
Size newLayoutSize;
bool isAutoScrollEnabled = false;
bool isAutoScrollMaxTextureExceeded = false;
Size newLayoutSize;
bool isAutoScrollEnabled = false;
bool isAutoScrollMaxTextureExceeded = false;
+ bool isHiddenInputEnabled = false;
layoutEngine.LayoutText(layoutParameters,
newLayoutSize,
textParameters.ellipsisEnabled,
isAutoScrollEnabled,
isAutoScrollMaxTextureExceeded,
layoutEngine.LayoutText(layoutParameters,
newLayoutSize,
textParameters.ellipsisEnabled,
isAutoScrollEnabled,
isAutoScrollMaxTextureExceeded,
ellipsisPosition);
return newLayoutSize;
ellipsisPosition);
return newLayoutSize;
// Update the visual model.
bool isAutoScrollEnabled = impl.mIsAutoScrollEnabled;
bool isAutoScrollMaxTextureExceeded = impl.mIsAutoScrollMaxTextureExceeded;
// Update the visual model.
bool isAutoScrollEnabled = impl.mIsAutoScrollEnabled;
bool isAutoScrollMaxTextureExceeded = impl.mIsAutoScrollMaxTextureExceeded;
+ bool isHiddenInputEnabled = false;
+ if(impl.mHiddenInput && impl.mEventData != nullptr && impl.mHiddenInput->GetHideMode() != Toolkit::HiddenInput::Mode::HIDE_NONE)
+ {
+ isHiddenInputEnabled = true;
+ }
Size newLayoutSize;
viewUpdated = impl.mLayoutEngine.LayoutText(layoutParameters,
Size newLayoutSize;
viewUpdated = impl.mLayoutEngine.LayoutText(layoutParameters,
elideTextEnabled,
isAutoScrollEnabled,
isAutoScrollMaxTextureExceeded,
elideTextEnabled,
isAutoScrollEnabled,
isAutoScrollMaxTextureExceeded,
ellipsisPosition);
impl.mIsAutoScrollEnabled = isAutoScrollEnabled;
ellipsisPosition);
impl.mIsAutoScrollEnabled = isAutoScrollEnabled;
mPreviousTextCount = 0u;
}
mPreviousTextCount = 0u;
}
+int HiddenText::GetHideMode()
+{
+ return mHideMode;
+}
+
bool HiddenText::OnTick()
{
if(mObserver != NULL)
bool HiddenText::OnTick()
{
if(mObserver != NULL)
void InitPreviousTextCount();
/**
void InitPreviousTextCount();
/**
+ * @brief Returns the hide mode of hidden text.
+ * @return The hide mode of hidden text.
+ */
+ int GetHideMode();
+
+ /**
* @brief Invoked when the timer is expired
*/
bool OnTick();
* @brief Invoked when the timer is expired
*/
bool OnTick();
* @param[out] lineLayout The line layout.
* @param[in] completelyFill Whether to completely fill the line ( even if the last word exceeds the boundaries ).
* @param[in] ellipsisPosition Where is the location the text elide
* @param[out] lineLayout The line layout.
* @param[in] completelyFill Whether to completely fill the line ( even if the last word exceeds the boundaries ).
* @param[in] ellipsisPosition Where is the location the text elide
+ * @param[in] hiddenInputEnabled Whether the hidden input is enabled.
*/
void GetLineLayoutForBox(const Parameters& parameters,
LayoutBidiParameters& bidiParameters,
*/
void GetLineLayoutForBox(const Parameters& parameters,
LayoutBidiParameters& bidiParameters,
bool completelyFill,
DevelText::EllipsisPosition::Type ellipsisPosition,
bool enforceEllipsisInSingleLine,
bool completelyFill,
DevelText::EllipsisPosition::Type ellipsisPosition,
bool enforceEllipsisInSingleLine,
+ bool elideTextEnabled,
+ bool hiddenInputEnabled)
{
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "-->GetLineLayoutForBox\n");
DALI_LOG_INFO(gLogFilter, Debug::Verbose, " initial glyph index : %d\n", lineLayout.glyphIndex);
{
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "-->GetLineLayoutForBox\n");
DALI_LOG_INFO(gLogFilter, Debug::Verbose, " initial glyph index : %d\n", lineLayout.glyphIndex);
const float previousTmpLength = tmpLineLayout.length;
const float previousTmpWhiteSpaceLengthEndOfLine = tmpLineLayout.whiteSpaceLengthEndOfLine;
const float previousTmpLength = tmpLineLayout.length;
const float previousTmpWhiteSpaceLengthEndOfLine = tmpLineLayout.whiteSpaceLengthEndOfLine;
+ // The calculated text size is used in atlas renderer.
+ // When the text is all white space, partial render issue occurs because the width is 0.
+ // To avoid issue, do not remove the white space size in hidden input mode.
+ if(isWhiteSpace && !hiddenInputEnabled)
{
// Add the length to the length of white spaces at the end of the line.
tmpLineLayout.whiteSpaceLengthEndOfLine += glyphMetrics.advance;
{
// Add the length to the length of white spaces at the end of the line.
tmpLineLayout.whiteSpaceLengthEndOfLine += glyphMetrics.advance;
tmpLineLayout.numberOfGlyphs -= numberOfGLyphsInGroup;
}
tmpLineLayout.numberOfGlyphs -= numberOfGLyphsInGroup;
}
- if(isRemovedGlyphWhiteSpace)
+ if(isRemovedGlyphWhiteSpace && !hiddenInputEnabled)
{
tmpLineLayout.penX -= glyphMetrics.advance;
tmpLineLayout.length -= glyphMetrics.advance;
{
tmpLineLayout.penX -= glyphMetrics.advance;
tmpLineLayout.length -= glyphMetrics.advance;
* @param[in] penY The vertical layout position.
* @param[in] currentParagraphDirection The current paragraph's direction.
* @param[in,out] isAutoScrollEnabled If the isAutoScrollEnabled is true and the height of the text exceeds the boundaries of the control the text is elided and the isAutoScrollEnabled is set to false to disable the autoscroll
* @param[in] penY The vertical layout position.
* @param[in] currentParagraphDirection The current paragraph's direction.
* @param[in,out] isAutoScrollEnabled If the isAutoScrollEnabled is true and the height of the text exceeds the boundaries of the control the text is elided and the isAutoScrollEnabled is set to false to disable the autoscroll
+ * @param[in] isHiddenInputEnabled Whether the hidden input is enabled.
* @param[in] ellipsisPosition Where is the location the text elide
*
* return Whether the line is ellipsized.
* @param[in] ellipsisPosition Where is the location the text elide
*
* return Whether the line is ellipsized.
float penY,
bool& isAutoScrollEnabled,
bool isAutoScrollMaxTextureExceeded,
float penY,
bool& isAutoScrollEnabled,
bool isAutoScrollMaxTextureExceeded,
+ bool isHiddenInputEnabled,
DevelText::EllipsisPosition::Type ellipsisPosition,
bool enforceEllipsisInSingleLine)
{
DevelText::EllipsisPosition::Type ellipsisPosition,
bool enforceEllipsisInSingleLine)
{
true,
ellipsisPosition,
enforceEllipsisInSingleLine,
true,
ellipsisPosition,
enforceEllipsisInSingleLine,
+ true,
+ isHiddenInputEnabled);
if(ellipsisPosition == DevelText::EllipsisPosition::START && !isMultiline)
{
if(ellipsisPosition == DevelText::EllipsisPosition::START && !isMultiline)
{
bool elideTextEnabled,
bool& isAutoScrollEnabled,
bool isAutoScrollMaxTextureExceeded,
bool elideTextEnabled,
bool& isAutoScrollEnabled,
bool isAutoScrollMaxTextureExceeded,
+ bool isHiddenInputEnabled,
DevelText::EllipsisPosition::Type ellipsisPosition)
{
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "-->LayoutText\n");
DevelText::EllipsisPosition::Type ellipsisPosition)
{
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "-->LayoutText\n");
false,
ellipsisPosition,
false,
false,
ellipsisPosition,
false,
+ elideTextEnabled,
+ isHiddenInputEnabled);
DALI_LOG_INFO(gLogFilter, Debug::Verbose, " glyph index %d\n", layout.glyphIndex);
DALI_LOG_INFO(gLogFilter, Debug::Verbose, " character index %d\n", layout.characterIndex);
DALI_LOG_INFO(gLogFilter, Debug::Verbose, " glyph index %d\n", layout.glyphIndex);
DALI_LOG_INFO(gLogFilter, Debug::Verbose, " character index %d\n", layout.characterIndex);
penY,
isAutoScrollEnabled,
isAutoScrollMaxTextureExceeded,
penY,
isAutoScrollEnabled,
isAutoScrollMaxTextureExceeded,
ellipsisPosition,
false);
}
ellipsisPosition,
false);
}
penY,
isAutoScrollEnabled,
isAutoScrollMaxTextureExceeded,
penY,
isAutoScrollEnabled,
isAutoScrollMaxTextureExceeded,
ellipsisPosition,
true);
}
ellipsisPosition,
true);
}
bool elideTextEnabled,
bool& isAutoScrollEnabled,
bool isAutoScrollMaxTextureExceeded,
bool elideTextEnabled,
bool& isAutoScrollEnabled,
bool isAutoScrollMaxTextureExceeded,
+ bool isHiddenInputEnabled,
DevelText::EllipsisPosition::Type ellipsisPosition)
{
return mImpl->LayoutText(layoutParameters,
DevelText::EllipsisPosition::Type ellipsisPosition)
{
return mImpl->LayoutText(layoutParameters,
elideTextEnabled,
isAutoScrollEnabled,
isAutoScrollMaxTextureExceeded,
elideTextEnabled,
isAutoScrollEnabled,
isAutoScrollMaxTextureExceeded,
* @param[in] elideTextEnabled Whether the text elide is enabled.
* @param[in,out] isAutoScrollEnabled If the isAutoScrollEnabled is true and the height of the text exceeds the boundaries of the control the text is elided and the isAutoScrollEnabled is set to false to disable the autoscroll
* @param[in] isAutoScrollMaxTextureExceeded If isAutoScrollMaxTextureExceeded is true, enable ellipsis during auro scroll.
* @param[in] elideTextEnabled Whether the text elide is enabled.
* @param[in,out] isAutoScrollEnabled If the isAutoScrollEnabled is true and the height of the text exceeds the boundaries of the control the text is elided and the isAutoScrollEnabled is set to false to disable the autoscroll
* @param[in] isAutoScrollMaxTextureExceeded If isAutoScrollMaxTextureExceeded is true, enable ellipsis during auro scroll.
+ * @param[in] isHiddenInputEnabled if isHiddenInputEnabled is true, hidden input feature is enabled.
* @param[in] ellipsisPosition The location of the text ellipsis
*
* @return \e true if the text has been re-laid-out. \e false means the given width is too small to layout even a single character.
* @param[in] ellipsisPosition The location of the text ellipsis
*
* @return \e true if the text has been re-laid-out. \e false means the given width is too small to layout even a single character.
bool elideTextEnabled,
bool& isAutoScrollEnabled,
bool isAutoScrollMaxTextureExceeded,
bool elideTextEnabled,
bool& isAutoScrollEnabled,
bool isAutoScrollMaxTextureExceeded,
+ bool isHiddenInputEnabled,
DevelText::EllipsisPosition::Type ellipsisPosition);
/**
DevelText::EllipsisPosition::Type ellipsisPosition);
/**