From 2695b7535730827bb9cb4cf9ad669671f87e56ac Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Mon, 18 Oct 2021 20:16:09 +0900 Subject: [PATCH] [NUI] Fix ContentPage to calculate AppBar and Content size correctly Previously, the size of AppBar and Content was set by setting Size2D property. This caused AppBar and Content to change their Width/HeightSpecification. Consequently, the size of AppBar and Content was not recalculated when window size was changed. Now, the size of AppBar and Content is set by SetSize() method. Since SetSize() method does not change Width/HeightSpecification, the size of AppBar and Content is recalculated correctly when window size is changed. --- src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs b/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs index 2a0be89..3e81083 100755 --- a/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs +++ b/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs @@ -183,7 +183,7 @@ namespace Tizen.NUI.Components appBarSizeH = Size2D.Height - Padding.Top - Padding.Bottom - appBar.Margin.Top - appBar.Margin.Bottom; } - appBar.Size2D = new Size2D(appBarSizeW, appBarSizeH); + appBar.SetSize(new Size2D(appBarSizeW, appBarSizeH)); } } @@ -209,7 +209,7 @@ namespace Tizen.NUI.Components contentSizeH = Size2D.Height - Padding.Top - Padding.Bottom - content.Margin.Top - content.Margin.Bottom - (appBar?.Size2D.Height ?? 0); } - content.Size2D = new Size2D(contentSizeW, contentSizeH); + content.SetSize(new Size2D(contentSizeW, contentSizeH)); } } } -- 2.7.4