From: Yurii Zinchuk/Tizen Services & IoT (PLT) /SRPOL/Engineer/Samsung Electronics Date: Mon, 19 Feb 2024 08:32:06 +0000 (+0100) Subject: set app size X-Git-Tag: accepted/tizen/unified/20240222.163404~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d25a07ebe557cace0c362243b46086b57bc850c;p=profile%2Fiot%2Fapps%2Fdotnet%2Fsettings.git set app size --- diff --git a/SettingView/SettingView.cs b/SettingView/SettingView.cs index 1cabb6a..bd9defd 100644 --- a/SettingView/SettingView.cs +++ b/SettingView/SettingView.cs @@ -501,14 +501,15 @@ namespace SettingView float widthRatio = 0.45f; float heightRatio = 0.5f; - var screenSize = GetScreenSize(); + _ = Information.TryGetValue("http://tizen.org/feature/screen.width", out int screenWidth); + _ = Information.TryGetValue("http://tizen.org/feature/screen.height", out int screenHeight); - int width = (int)(screenSize.Width * widthRatio); - int height = (int)(screenSize.Height * (1 - bottomMargin) * heightRatio); + int width = (int)(screenWidth * widthRatio); + int height = (int)(screenHeight * (1 - bottomMargin) * heightRatio); // INFO: it looks like size of custom border is not included in total window size Size2D size = new Size2D(width, height); - Position2D position = new Position2D(((int)screenSize.Width - width) / 2, ((int)screenSize.Height - height) / 2 - (int)(bottomMargin * screenSize.Height)); + Position2D position = new Position2D((screenWidth - width) / 2, (screenHeight - height) / 2 - (int)(bottomMargin * screenHeight)); appCustomBorder = new SettingViewBorder();