From: Mobaswirul Islam/NC eXperience Group /SRBD/Engineer/Samsung Electronics Date: Tue, 27 Aug 2024 08:28:39 +0000 (+0600) Subject: Fixed Border Radius Alignment X-Git-Tag: accepted/tizen/unified/20240906.155828~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04b99fdb356543e9bde2d017d7bfbf2c33128689;p=profile%2Fiot%2Fapps%2Fdotnet%2Fnotifications.git Fixed Border Radius Alignment [Problem] [TNINE-4268] When scale factor is default, the border radious is not aligned with window content. [Cause & Measure] Cause : CornerRadius was not calucalted properly Measure : Used proper calculation for BorderRadius Change-Id: If67aea9e04febb2139a4b32a43280aa5d7bfad54 Signed-off-by: Mobaswirul Islam/NC eXperience Group /SRBD/Engineer/Samsung Electronics --- diff --git a/Notifications/Common/AppConstants.cs b/Notifications/Common/AppConstants.cs index 618eb33..c9bdc2b 100644 --- a/Notifications/Common/AppConstants.cs +++ b/Notifications/Common/AppConstants.cs @@ -28,13 +28,16 @@ namespace Notifications.Common public static Position2D DefaultWindowPosition = new Position2D(480, 170); - public const int BorderHeight = 52; public const int HeaderHeight = 64; public const int NotificationItemHeight = 80; - public const int BorderCornerRadius = 24; - public const int BaseViewCornerRadius = 24; public const int TextPixelSize = 24; + public const int BorderHeight = 48; + public const int BorderThickness = 6; + public const int BorderCornerRadius = 26; + public const int BorderWindowPadding = 6; + + public const int BaseViewCornerRadius = 26; public static Extents BaseViewPadding = new Extents(0, 0, 20, 20); public static Extents HeaderPadding = new Extents(16, 16, 8, 8); public static Extents DetailContentMargin = new Extents(64, 64, 8, 8); diff --git a/Notifications/CustomBorder.cs b/Notifications/CustomBorder.cs index 69290d0..ef8ec6d 100644 --- a/Notifications/CustomBorder.cs +++ b/Notifications/CustomBorder.cs @@ -29,9 +29,10 @@ namespace Notifications private View borderView; private static Size2D IconSize = new Size2D(48, 48); - private const int BorderThickness = 4; - private const int BottomViewHeight = 48; - private const int BorderCornerRadius = 24; + private const int BorderThickness = AppConstants.BorderThickness; + private const int BottomViewHeight = AppConstants.BorderHeight; + private const int BorderCornerRadius = AppConstants.BorderCornerRadius; + private const int BorderWindowPadding = AppConstants.BorderWindowPadding; public CustomBorder() : base() { diff --git a/Notifications/Views/BaseView.cs b/Notifications/Views/BaseView.cs index 6cd0d18..4b18949 100644 --- a/Notifications/Views/BaseView.cs +++ b/Notifications/Views/BaseView.cs @@ -50,14 +50,15 @@ namespace Notifications.Views { ThemeChangeSensitive = true; Size2D = Window.Instance.Size; - CornerRadius = AppConstants.BaseViewCornerRadius; + CornerRadius = (AppConstants.BorderCornerRadius - AppConstants.BorderWindowPadding).SpToPx(); Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Vertical, HorizontalAlignment = HorizontalAlignment.Begin, VerticalAlignment = VerticalAlignment.Top, - Padding = AppConstants.BaseViewPadding, + Padding = AppConstants.BorderWindowPadding, }; + AddTopView(); UpdateContent(); this.SetBinding(IsContentAvailableProperty, "IsNotificationsPresent"); diff --git a/packaging/org.tizen.notifications-1.0.2.tpk b/packaging/org.tizen.notifications-1.0.2.tpk index a8b5273..00f84cb 100644 Binary files a/packaging/org.tizen.notifications-1.0.2.tpk and b/packaging/org.tizen.notifications-1.0.2.tpk differ