Samsung / TizenFX

C# Device APIs for Tizen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ElmSharp] Background does not work properly on F-hub

shyunMin opened this issue · comments

commented

Description

Background does not work properly on F-hub.
The size and aspect ratio(BackgroundOption) of the image is not changed if any objects set as content.

  • Issue (F-hub)
Height=300, Width=300 Height=100, Width=300
  • Expected Behavior (6.0 Mobile)
Height=300, Width=300 Height=100, Width=300

Here is the test code I used.

namespace ElmSharp.Test
{
    class BackgroundTest : TestCaseBase
    {
        public override string TestName => "BackgroundTest";
        public override string TestDescription => "To test basic operation of background";

        Box box;

        public override void Run(Window window)
        {
            Conformant conformant = new Conformant(window);
            conformant.Show();
            box = new Box(window);
            box.BackgroundColor = Color.Orange;
            conformant.SetContent(box);
            box.Show();

            var background = new Background(box);
            background.MinimumHeight = 300;
            background.MinimumWidth = 300;
            background.File = Path.Combine(TestRunner.ResourceDir, "picture.png");
            background.Show();
            box.PackStart(background);

            var innerBox = new Box(background);
            background.SetContent(innerBox);

            var content = new Label(background)
            {
                MinimumHeight = 50,
                MinimumWidth = 50,
                BackgroundColor = Color.Red,
                Text = "Content"
            };
            content.Show();
            innerBox.PackEnd(content);

            var button = new Button(box)
            {
                AlignmentX = -1,
                WeightX = - 1,
                Text = "click"
            };
            button.Show();

            button.Clicked += (s, e) =>
            {
                background.MinimumHeight = (background.MinimumHeight > 100) ? 100 : 300;
            };

            box.PackEnd(button);
        }
    }
}