textModel->mEllipsisPosition = ellipsisPosition;
textModel->mVisualModel->SetEllipsisPosition(ellipsisPosition);
+ //Inset
+ textModel->mRemoveFrontInset = true;
+ textModel->mRemoveBackInset = true;
+
// 1) Convert to utf32
Vector<Character>& utf32Characters = logicalModel->mText;
utf32Characters.Resize(textSize);
ControllerPtr controller = Controller::New();
ConfigureTextLabel(controller);
+ controller->SetRemoveFrontInset(true);
+ controller->SetRemoveBackInset(true);
// single line, line spacing = 0px
{
controller->SetMultiLineEnabled( data.isMultiLines );
controller->SetLineWrapMode( (Text::LineWrap::Mode)(data.lineWrapMode) );
controller->SetEllipsisPosition( data.ellipsisPosition );
+ controller->SetRemoveFrontInset(true);
+ controller->SetRemoveBackInset(true);
controller->SetText(data.text);
controller->Relayout( data.size );
controller->SetTextElideEnabled( true );
controller->SetEllipsisPosition( data.ellipsisPosition );
+ controller->SetRemoveFrontInset(true);
+ controller->SetRemoveBackInset(true);
+
controller->SetText( data.text );
controller->Relayout( data.size );
// Sets a text and relais-out.
controller->SetMarkupProcessorEnabled(true);
+ controller->SetRemoveFrontInset(true);
+ controller->SetRemoveBackInset(true);
controller->SetText("<font family='TizenSansRegular' size='10'>Lorem ipsum dolor sit amet, aeque definiebas ea mei, posse iracundia ne cum.</font>");
controller->Relayout(CONTROL_SIZE);
DALI_TEST_EQUALS(editor.GetProperty<float>(DevelTextEditor::Property::MIN_LINE_SIZE), 50.0f, Math::MACHINE_EPSILON_1000, TEST_LOCATION);
// Check Remove Front/Back Inset Property
- DALI_TEST_CHECK(editor.GetProperty<bool>(DevelTextEditor::Property::REMOVE_FRONT_INSET));
- editor.SetProperty(DevelTextEditor::Property::REMOVE_FRONT_INSET, false);
DALI_TEST_CHECK(!editor.GetProperty<bool>(DevelTextEditor::Property::REMOVE_FRONT_INSET));
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_FRONT_INSET, true);
+ DALI_TEST_CHECK(editor.GetProperty<bool>(DevelTextEditor::Property::REMOVE_FRONT_INSET));
- DALI_TEST_CHECK(editor.GetProperty<bool>(DevelTextEditor::Property::REMOVE_BACK_INSET));
- editor.SetProperty(DevelTextEditor::Property::REMOVE_BACK_INSET, false);
DALI_TEST_CHECK(!editor.GetProperty<bool>(DevelTextEditor::Property::REMOVE_BACK_INSET));
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_BACK_INSET, true);
+ DALI_TEST_CHECK(editor.GetProperty<bool>(DevelTextEditor::Property::REMOVE_BACK_INSET));
application.SendNotification();
application.Render();
TextEditor textEditor = TextEditor::New();
textEditor.SetProperty(Actor::Property::SIZE, Vector2(150.0f, 300.f));
+ textEditor.SetProperty(DevelTextEditor::Property::REMOVE_FRONT_INSET, true);
+ textEditor.SetProperty(DevelTextEditor::Property::REMOVE_BACK_INSET, true);
application.GetScene().Add(textEditor);
application.SendNotification();
editor.SetProperty(DevelTextEditor::Property::ENABLE_SCROLL_BAR, false);
editor.SetProperty(DevelTextEditor::Property::ELLIPSIS, true);
editor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::START);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_FRONT_INSET, true);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_BACK_INSET, true);
editor.SetProperty(TextEditor::Property::TEXT, "line1 \nline2\nline 3\nline4");
// Avoid a crash when core load gl resources.
editor.SetProperty(DevelTextEditor::Property::ENABLE_SCROLL_BAR, false);
editor.SetProperty(DevelTextEditor::Property::ELLIPSIS, true);
editor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::MIDDLE);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_FRONT_INSET, true);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_BACK_INSET, true);
editor.SetProperty(TextEditor::Property::TEXT, "line1 \nline2\nline 3\nline4");
// Avoid a crash when core load gl resources.
editor.SetProperty(DevelTextEditor::Property::ENABLE_SCROLL_BAR, false);
editor.SetProperty(DevelTextEditor::Property::ELLIPSIS, true);
editor.SetProperty(DevelTextEditor::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::END);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_FRONT_INSET, true);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_BACK_INSET, true);
editor.SetProperty(TextEditor::Property::TEXT, "line1 \nline2\nline 3\nline4");
// Avoid a crash when core load gl resources.
editor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
editor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
editor.SetProperty(TextEditor::Property::ENABLE_MARKUP, true);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_FRONT_INSET, true);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_BACK_INSET, true);
editor.SetProperty(TextEditor::Property::TEXT, "line1 \nline2\nline 3\nالاخيرالسطر");
// Avoid a crash when core load gl resources.
label.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
label.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
label.SetProperty(TextEditor::Property::ENABLE_MARKUP, true);
+ label.SetProperty(DevelTextEditor::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextEditor::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextEditor::Property::TEXT, "H");
// Avoid a crash when core load gl resources.
tet_infoline(" utcDaliTextEditorRemoveFrontInset");
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK(editor);
+
application.GetScene().Add(editor);
application.SendNotification();
application.Render();
- DevelTextEditor::SetRemoveFrontInset(editor, false);
- DALI_TEST_CHECK(!DevelTextEditor::IsRemoveFrontInset(editor));
+
+ DALI_TEST_CHECK(!DevelTextEditor::IsRemoveFrontInset(editor)); // default value is false.
+ DevelTextEditor::SetRemoveFrontInset(editor, true);
+ DALI_TEST_CHECK(DevelTextEditor::IsRemoveFrontInset(editor));
+
END_TEST;
}
int utcDaliTextEditorRemoveBackInset(void)
tet_infoline(" utcDaliTextEditorRemoveBackInset");
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK(editor);
+
application.GetScene().Add(editor);
application.SendNotification();
application.Render();
- DevelTextEditor::SetRemoveBackInset(editor, false);
- DALI_TEST_CHECK(!DevelTextEditor::IsRemoveBackInset(editor));
+
+ DALI_TEST_CHECK(!DevelTextEditor::IsRemoveBackInset(editor)); // default value is false.
+ DevelTextEditor::SetRemoveBackInset(editor, true);
+ DALI_TEST_CHECK(DevelTextEditor::IsRemoveBackInset(editor));
+
END_TEST;
}
application.Render();
// Check Remove Front/Back Inset Property
- DALI_TEST_CHECK(field.GetProperty<bool>(DevelTextField::Property::REMOVE_FRONT_INSET));
- field.SetProperty(DevelTextField::Property::REMOVE_FRONT_INSET, false);
DALI_TEST_CHECK(!field.GetProperty<bool>(DevelTextField::Property::REMOVE_FRONT_INSET));
+ field.SetProperty(DevelTextField::Property::REMOVE_FRONT_INSET, true);
+ DALI_TEST_CHECK(field.GetProperty<bool>(DevelTextField::Property::REMOVE_FRONT_INSET));
- DALI_TEST_CHECK(field.GetProperty<bool>(DevelTextField::Property::REMOVE_BACK_INSET));
- field.SetProperty(DevelTextField::Property::REMOVE_BACK_INSET, false);
DALI_TEST_CHECK(!field.GetProperty<bool>(DevelTextField::Property::REMOVE_BACK_INSET));
+ field.SetProperty(DevelTextField::Property::REMOVE_BACK_INSET, true);
+ DALI_TEST_CHECK(field.GetProperty<bool>(DevelTextField::Property::REMOVE_BACK_INSET));
application.SendNotification();
application.Render();
field.SetProperty(TextField::Property::ENABLE_MARKUP, true);
field.SetProperty(DevelTextField::Property::ELLIPSIS, true);
field.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::START);
+ field.SetProperty(DevelTextField::Property::REMOVE_FRONT_INSET, true);
+ field.SetProperty(DevelTextField::Property::REMOVE_BACK_INSET, true);
field.SetProperty(TextField::Property::TEXT, "Hello World");
// Avoid a crash when core load gl resources.
field.SetProperty(TextField::Property::ENABLE_MARKUP, true);
field.SetProperty(DevelTextField::Property::ELLIPSIS, true);
field.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::END);
+ field.SetProperty(DevelTextField::Property::REMOVE_FRONT_INSET, true);
+ field.SetProperty(DevelTextField::Property::REMOVE_BACK_INSET, true);
field.SetProperty(TextField::Property::TEXT, "Hello World");
// Avoid a crash when core load gl resources.
application.SendNotification();
application.Render();
- DevelTextField::SetRemoveFrontInset(field, false);
- DALI_TEST_CHECK(!DevelTextField::IsRemoveFrontInset(field));
+ DALI_TEST_CHECK(!DevelTextField::IsRemoveFrontInset(field)); // default value is false.
+ DevelTextField::SetRemoveFrontInset(field, true);
+ DALI_TEST_CHECK(DevelTextField::IsRemoveFrontInset(field));
END_TEST;
}
application.SendNotification();
application.Render();
- DevelTextField::SetRemoveBackInset(field, false);
- DALI_TEST_CHECK(!DevelTextField::IsRemoveBackInset(field));
+ DALI_TEST_CHECK(!DevelTextField::IsRemoveBackInset(field)); // default value is false.
+ DevelTextField::SetRemoveBackInset(field, true);
+ DALI_TEST_CHECK(DevelTextField::IsRemoveBackInset(field));
END_TEST;
}
label.SetProperty(TextLabel::Property::POINT_SIZE, 10.f);
label.SetProperty(DevelTextLabel::Property::LINE_SPACING, lineSpacing);
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
editor.SetProperty(Actor::Property::SIZE, Vector2(160.0f, 250.f));
editor.SetProperty(TextEditor::Property::POINT_SIZE, 10.f);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_FRONT_INSET, true);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_BACK_INSET, true);
editor.SetProperty(TextEditor::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
field.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
field.SetProperty(Actor::Property::SIZE, Vector2(450.0f, 350.f));
field.SetProperty(TextField::Property::POINT_SIZE, 10.f);
+ field.SetProperty(DevelTextField::Property::REMOVE_FRONT_INSET, true);
+ field.SetProperty(DevelTextField::Property::REMOVE_BACK_INSET, true);
field.SetProperty(TextField::Property::TEXT, "مرحبا بالعالم");
application.SendNotification();
label.SetProperty(TextLabel::Property::POINT_SIZE, 10.f);
label.SetProperty(DevelTextLabel::Property::LINE_SPACING, lineSpacing);
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
label.SetProperty(TextLabel::Property::POINT_SIZE, 10.f);
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
label.SetProperty(Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "TOP");
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
label.SetProperty(TextLabel::Property::POINT_SIZE, 10.f);
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
label.SetProperty(Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "BOTTOM");
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
label.SetProperty(TextLabel::Property::ELLIPSIS, true);
label.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::MIDDLE);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
label.SetProperty(TextLabel::Property::ELLIPSIS, true);
label.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::START);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
label.SetProperty(TextLabel::Property::ELLIPSIS, true);
label.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::END);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
label.SetProperty(TextLabel::Property::POINT_SIZE, 10.f);
label.SetProperty(DevelTextLabel::Property::LINE_SPACING, lineSpacing);
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
editor.SetProperty(Actor::Property::SIZE, Vector2(160.0f, 250.f));
editor.SetProperty(TextEditor::Property::POINT_SIZE, 10.f);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_FRONT_INSET, true);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_BACK_INSET, true);
editor.SetProperty(TextEditor::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
label.SetProperty(TextLabel::Property::POINT_SIZE, 10.f);
label.SetProperty(DevelTextLabel::Property::LINE_SPACING, lineSpacing);
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
label.SetProperty(TextLabel::Property::POINT_SIZE, 10.f);
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
label.SetProperty(Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "TOP");
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
label.SetProperty(TextLabel::Property::POINT_SIZE, 10.f);
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
label.SetProperty(Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "BOTTOM");
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Lorem ipsum dolor sit amet, \n consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
application.SendNotification();
editor.SetProperty(Actor::Property::SIZE, Vector2(160.0f, 250.f));
editor.SetProperty(TextEditor::Property::POINT_SIZE, 10.f);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_FRONT_INSET, true);
+ editor.SetProperty(DevelTextEditor::Property::REMOVE_BACK_INSET, true);
editor.SetProperty(TextEditor::Property::TEXT, "Hello everyone.");
application.SendNotification();
label.SetProperty(Actor::Property::SIZE, Vector2(450.0f, 300.f));
label.SetProperty(TextLabel::Property::POINT_SIZE, 10.f);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Hello");
application.SendNotification();
application.Render();
// Check Remove Front/Back Inset Property
- DALI_TEST_CHECK(label.GetProperty<bool>(DevelTextLabel::Property::REMOVE_FRONT_INSET));
- label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, false);
DALI_TEST_CHECK(!label.GetProperty<bool>(DevelTextLabel::Property::REMOVE_FRONT_INSET));
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ DALI_TEST_CHECK(label.GetProperty<bool>(DevelTextLabel::Property::REMOVE_FRONT_INSET));
- DALI_TEST_CHECK(label.GetProperty<bool>(DevelTextLabel::Property::REMOVE_BACK_INSET));
- label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, false);
DALI_TEST_CHECK(!label.GetProperty<bool>(DevelTextLabel::Property::REMOVE_BACK_INSET));
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
+ DALI_TEST_CHECK(label.GetProperty<bool>(DevelTextLabel::Property::REMOVE_BACK_INSET));
application.SendNotification();
application.Render();
TextLabel label = TextLabel::New();
label.SetProperty(Actor::Property::SIZE, Vector2(300.0f, 300.f));
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Hello world Hello world");
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
TextLabel label = TextLabel::New();
Vector2 size(460.0f, 100.0f);
label.SetProperty(Actor::Property::SIZE, size);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Hello world");
// connect to the text git changed signal.
TextLabel label = TextLabel::New();
Vector2 size(460.0f, 100.0f);
label.SetProperty(Actor::Property::SIZE, size);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "Hello world");
// connect to the text git changed signal.
TextLabel label = TextLabel::New();
Vector2 size(300.0f, 80.0f);
label.SetProperty(Actor::Property::SIZE, size);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog");
label.SetProperty(DevelTextLabel::Property::MIN_LINE_SIZE, 80.f);
label.SetProperty(TextLabel::Property::POINT_SIZE, 10.f);
label.SetProperty(Actor::Property::SIZE, Vector2(150.0f, 300.f));
label.SetProperty(TextLabel::Property::POINT_SIZE, 12.f);
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
application.GetScene().Add(label);
application.SendNotification();
application.Render();
label.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
label.SetProperty(TextLabel::Property::ENABLE_MARKUP, true);
label.SetProperty(TextLabel::Property::MULTI_LINE, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "line1 \nline2\nline 3\nالاخيرالسطر");
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE);
label.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
label.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
label.SetProperty(TextLabel::Property::ENABLE_MARKUP, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, true);
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, true);
label.SetProperty(TextLabel::Property::TEXT, "H");
// Avoid a crash when core load gl resources.
application.SendNotification();
application.Render();
- DevelTextLabel::SetRemoveFrontInset(label, false);
- DALI_TEST_CHECK(!DevelTextLabel::IsRemoveFrontInset(label));
+ DALI_TEST_CHECK(!DevelTextLabel::IsRemoveFrontInset(label)); // default value is false.
+ DevelTextLabel::SetRemoveFrontInset(label, true);
+ DALI_TEST_CHECK(DevelTextLabel::IsRemoveFrontInset(label));
END_TEST;
}
application.SendNotification();
application.Render();
- DevelTextLabel::SetRemoveBackInset(label, false);
- DALI_TEST_CHECK(!DevelTextLabel::IsRemoveBackInset(label));
+ DALI_TEST_CHECK(!DevelTextLabel::IsRemoveBackInset(label)); // default value is false.
+ DevelTextLabel::SetRemoveBackInset(label, true);
+ DALI_TEST_CHECK(DevelTextLabel::IsRemoveBackInset(label));
END_TEST;
}
\ No newline at end of file
mAlignmentOffset(0.0f),
mElideEnabled(false),
mIgnoreSpacesAfterText(true),
- mRemoveFrontInset(true),
- mRemoveBackInset(true),
+ mRemoveFrontInset(false),
+ mRemoveBackInset(false),
mMatchLayoutDirection(DevelText::MatchLayoutDirection::INHERIT),
mEllipsisPosition(DevelText::EllipsisPosition::END)
{