From b969ebfe9b4bc1eaf1460b997edc07157d150a91 Mon Sep 17 00:00:00 2001 From: "minho.sun" Date: Mon, 14 Aug 2017 20:20:26 +0900 Subject: [PATCH] [Tizen] fix LineWrap GET error This reverts commit ecb3ddfc3b850a3fbddca58abd5760fd01221f70. Change-Id: I87fab9bc5014e854d5247c380bbbd80f5e68f628 --- .../NUISamples.Tizen/examples/hello-world.cs | 110 +++++++++++++-------- 1 file changed, 68 insertions(+), 42 deletions(-) diff --git a/NUISamples/NUISamples/NUISamples.Tizen/examples/hello-world.cs b/NUISamples/NUISamples/NUISamples.Tizen/examples/hello-world.cs index 144e790..faeb66f 100755 --- a/NUISamples/NUISamples/NUISamples.Tizen/examples/hello-world.cs +++ b/NUISamples/NUISamples/NUISamples.Tizen/examples/hello-world.cs @@ -98,9 +98,9 @@ namespace HelloWorldTest _animation.Finished += AnimationFinished; _view.SizeWidth = 50; - NUILog.Debug("[2]_view SizeWidth=" + _view.SizeWidth); - - TextLabelLineWrapModeTest(); + NUILog.Debug("[2]_view SizeWidth=" + _view.SizeWidth); + + TextLabelLineWrapModeTest(); } public void AnimationFinished(object sender, EventArgs e) @@ -117,7 +117,7 @@ namespace HelloWorldTest int win_test; public void OnWindowKeyEvent(object sender, Window.KeyEventArgs e) { - NUILog.Debug("e.Key.KeyPressedName=" + e.Key.KeyPressedName); + NUILog.Debug("e.Key.KeyPressedName=" + e.Key.KeyPressedName); if (e.Key.State == Key.StateType.Down) { @@ -128,10 +128,10 @@ namespace HelloWorldTest _animation.Finished += AnimationFinished; cnt++; NUILog.Debug("AnimationFinished added!"); - } - pointLabel.TextColorAnimatable = Color.Blue; - pixelLabel.TextColorAnimatable = Color.Blue; - + } + pointLabel.TextColorAnimatable = Color.Blue; + pixelLabel.TextColorAnimatable = Color.Blue; + NUILog.Debug($"LineWrapMode 1st={ myTextLabel?.LineWrapMode} 2nd={ myTextLabel2?.LineWrapMode}"); } else if (e.Key.KeyPressedName == "Down") @@ -141,18 +141,18 @@ namespace HelloWorldTest _animation.Finished -= AnimationFinished; cnt--; NUILog.Debug("AnimationFinished removed!"); - } - pointLabel.TextColorAnimatable = Color.Red; - pixelLabel.TextColorAnimatable = Color.Red; - + } + pointLabel.TextColorAnimatable = Color.Red; + pixelLabel.TextColorAnimatable = Color.Red; + Window.Instance.SetClass($"Window.SetClass() Test #{win_test++}", ""); NUILog.Debug($"Check with enlightenment_info -topwins ! Window.SetClass() Test #{win_test}"); } else if (e.Key.KeyPressedName == "Return") { _animation.Play(); - NUILog.Debug("_animation play here!"); - } + NUILog.Debug("_animation play here!"); + } } } @@ -164,34 +164,60 @@ namespace HelloWorldTest } } - private TextLabel myTextLabel; - private TextLabel myTextLabel2; - public void TextLabelLineWrapModeTest() - { - NUILog.Debug("WrapModeTest START!"); - myTextLabel = new TextLabel(); - myTextLabel.Position2D = new Position2D(10, 600); - myTextLabel.Size2D = new Size2D(400, 100); - myTextLabel.BackgroundColor = Color.Blue; - myTextLabel.PointSize = 20; - myTextLabel.TextColor = Color.White; - myTextLabel.MultiLine = true; - myTextLabel.LineWrapMode = LineWrapMode.Character; - myTextLabel.Text = $"[LineWrapMode.Character] hello my name is ABCDEFGHI, it is very very long beautiful hansome awesome name."; - Window.Instance.GetDefaultLayer().Add(myTextLabel); - - myTextLabel2 = new TextLabel(); - myTextLabel2.Position2D = new Position2D(10, 800); - myTextLabel2.Size2D = new Size2D(400, 100); - myTextLabel2.BackgroundColor = Color.Blue; - myTextLabel2.PointSize = 20; - myTextLabel2.TextColor = Color.White; - myTextLabel2.MultiLine = true; - myTextLabel2.LineWrapMode = LineWrapMode.Word; - myTextLabel2.Text = $"[LineWrapMode.Word] hello my name is ABCDEFGHI, it is very very long beautiful hansome awesome name."; - Window.Instance.GetDefaultLayer().Add(myTextLabel2); - - NUILog.Debug($"LineWrapMode 1st={ myTextLabel?.LineWrapMode} 2nd={ myTextLabel2?.LineWrapMode}"); + private TextLabel myTextLabel; + private TextLabel myTextLabel2; + private TextEditor myTextEditor; + private TextEditor myTextEditor2; + public void TextLabelLineWrapModeTest() + { + NUILog.Debug("WrapModeTest START!"); + myTextLabel = new TextLabel(); + myTextLabel.Position2D = new Position2D(10, 600); + myTextLabel.Size2D = new Size2D(400, 90); + myTextLabel.BackgroundColor = Color.Blue; + myTextLabel.PointSize = 20; + myTextLabel.TextColor = Color.White; + myTextLabel.MultiLine = true; + myTextLabel.LineWrapMode = LineWrapMode.Character; + myTextLabel.Text = $"[TextLabel LineWrapMode.Character] hello ABCDEFGHI is my name, it is very very long beautiful hansome awesome name."; + Window.Instance.GetDefaultLayer().Add(myTextLabel); + + myTextLabel2 = new TextLabel(); + myTextLabel2.Position2D = new Position2D(450, 600); + myTextLabel2.Size2D = new Size2D(400, 90); + myTextLabel2.BackgroundColor = Color.Blue; + myTextLabel2.PointSize = 20; + myTextLabel2.TextColor = Color.White; + myTextLabel2.MultiLine = true; + myTextLabel2.LineWrapMode = LineWrapMode.Word; + myTextLabel2.Text = $"[TextLabel LineWrapMode.Word] hello ABCDEFGHI is my name, it is very very long beautiful hansome awesome name."; + Window.Instance.GetDefaultLayer().Add(myTextLabel2); + + NUILog.Debug($"TextLabel LineWrapMode 1st={ myTextLabel?.LineWrapMode} 2nd={ myTextLabel2?.LineWrapMode}"); + + myTextEditor = new TextEditor(); + myTextEditor.Position2D = new Position2D(10, 700); + myTextEditor.Size2D = new Size2D(400, 90); + myTextEditor.BackgroundColor = Color.Red; + myTextEditor.PointSize = 20; + myTextEditor.TextColor = Color.White; + //myTextEditor.MultiLine = true; + myTextEditor.LineWrapMode = LineWrapMode.Character; + myTextEditor.Text = $"[TextEditor LineWrapMode.Character] hello ABCDEFGHI is my name, it is very very long beautiful hansome awesome name."; + Window.Instance.GetDefaultLayer().Add(myTextEditor); + + myTextEditor2 = new TextEditor(); + myTextEditor2.Position2D = new Position2D(450, 700); + myTextEditor2.Size2D = new Size2D(400, 90); + myTextEditor2.BackgroundColor = Color.Red; + myTextEditor2.PointSize = 20; + myTextEditor2.TextColor = Color.White; + //myTextEditor2.MultiLine = true; + myTextEditor2.LineWrapMode = LineWrapMode.Word; + myTextEditor2.Text = $"[TextEditor LineWrapMode.Word] hello ABCDEFGHI is my name, it is very very long beautiful hansome awesome name."; + Window.Instance.GetDefaultLayer().Add(myTextEditor2); + + NUILog.Debug($"TextEditor LineWrapMode 1st={ myTextEditor?.LineWrapMode} 2nd={ myTextEditor2?.LineWrapMode}"); } [STAThread] -- 2.7.4