Add DpUtils dp
authorKrzysztof Wieclaw/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <k.wieclaw@samsung.com>
Fri, 24 Sep 2021 14:48:38 +0000 (16:48 +0200)
committerKrzysztof Wieclaw/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <k.wieclaw@samsung.com>
Fri, 24 Sep 2021 14:48:38 +0000 (16:48 +0200)
Change-Id: I2f659e7cb6c4aaea488ea327d3ceefd03d795962
Signed-off-by: Krzysztof Wieclaw/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <k.wieclaw@samsung.com>
24 files changed:
Oobe/Oobe.Common/Controls/CarouselPicker.cs
Oobe/Oobe.Common/Oobe.Common.csproj
Oobe/Oobe.Common/Pages/BasePage.cs
Oobe/Oobe.Common/Styles/ButtonStyles.cs
Oobe/Oobe.Common/Styles/CarouselPickerStyles.cs
Oobe/Oobe.Common/Utils/DpUtils.cs [new file with mode: 0644]
Oobe/Oobe.Language/LanguageStep.cs
Oobe/Oobe.Language/Oobe.Language.csproj
Oobe/Oobe.Region/Oobe.Region.csproj
Oobe/Oobe.Terms/Oobe.Terms.csproj
Oobe/Oobe.Terms/TermsStep.cs
Oobe/Oobe.Terms/Views/TermsView.cs
Oobe/Oobe.Welcome/Oobe.Welcome.csproj
Oobe/Oobe.Wifi/Controls/ListView.cs
Oobe/Oobe.Wifi/Controls/Wifi/AddNewNetworkPupup.cs
Oobe/Oobe.Wifi/Controls/Wifi/ApView.cs
Oobe/Oobe.Wifi/Controls/Wifi/ButtonStyles.cs
Oobe/Oobe.Wifi/Controls/Wifi/ChangeSecurityTypePopup.cs
Oobe/Oobe.Wifi/Controls/Wifi/SecurityTypeView.cs
Oobe/Oobe.Wifi/Controls/Wifi/WifiPasswordPopup.cs
Oobe/Oobe.Wifi/Controls/Wifi/WifiView.cs
Oobe/Oobe.Wifi/Oobe.Wifi.csproj
Oobe/Oobe/Oobe.csproj
Oobe/Oobe/OobeApp.cs

index 054a27f37b67b387259ca669e8e43c5a22614f8e..f292c899ececa524ef490d37d7b9affbd18a4110 100644 (file)
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-using Oobe.Common.Utils;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Binding;
-using Tizen.NUI.Components;
-
-namespace Oobe.Common.Controls
-{
-    public class CarouselPicker : Control
-    {
-        private Oobe.Common.Controls.ScrollableBase scrollableBase;
-        private View itemsListView;
-        private View upperLine;
-        private View lowerLine;
-
-        private Vector3 textCenterColorHSV = new Vector3();
-        private Vector3 textOuterColorHSV = new Vector3();
-
-        private float textCenterOpacity;
-        private float textOuterOpacity;
-        private int selectedItemIndex = 0;
-
-        private List<CarouselPickerItemData> items = new List<CarouselPickerItemData>();
-
-        public CarouselPicker()
-            : base()
-        {
-        }
-
-        public CarouselPicker(CarouselPickerStyle style)
-            : base(style)
-        {
-            // TODO fix a bug with style not properly applied by base class
-            ApplyStyle(style);
-        }
-
-        public event EventHandler SelectedItemChanged;
-
-        public new CarouselPickerStyle Style => ViewStyle as CarouselPickerStyle;
-
-        public int SelectedItemIndex
-        {
-            get
-            {
-                return selectedItemIndex;
-            }
-
-            set
-            {
-                // always scroll
-                scrollableBase.ScrollToIndex(value);
-                if (selectedItemIndex != value)
-                {
-                    SelectedItemChanged?.Invoke(this, null);
-                    selectedItemIndex = value;
-                }
-            }
-        }
-
-        public void AddItem(CarouselPickerItemData item)
-        {
-            var view = CreateItemView(item);
-            itemsListView.Add(view);
-            items.Add(item);
-        }
-
-        public void RemoveItem(CarouselPickerItemData item)
-        {
-            var index = items.IndexOf(item);
-            items.Remove(item);
-            itemsListView.Children.RemoveAt(index);
-        }
-
-        public override void ApplyStyle(ViewStyle viewStyle)
-        {
-            base.ApplyStyle(viewStyle);
-
-            CarouselPickerStyle style = viewStyle as CarouselPickerStyle;
-
-            if (style != null)
-            {
-                Layout = new LinearLayout
-                {
-                    LinearOrientation = LinearLayout.Orientation.Vertical,
-                    LinearAlignment = LinearLayout.Alignment.Center,
-                };
-                ClippingMode = ClippingModeType.ClipToBoundingBox;
-
-                // Animatable properties
-                textCenterColorHSV = Style.CenterText?.TextColor?.All?.ToHSV() ?? new Vector3();
-                textCenterOpacity = Style.CenterText?.Opacity?.All ?? 1.0f;
-
-                textOuterColorHSV = Style.OuterText?.TextColor?.All?.ToHSV() ?? new Vector3();
-                textOuterOpacity = Style.OuterText?.Opacity?.All ?? 1.0f;
-
-                if (itemsListView != null)
-                {
-                    scrollableBase?.Remove(itemsListView);
-                    itemsListView.Dispose();
-                }
-
-                itemsListView = new View
-                {
-                    Layout = new LinearLayout
-                    {
-                        LinearOrientation = LinearLayout.Orientation.Vertical,
-                    },
-                    WidthSpecification = LayoutParamPolicies.MatchParent,
-                    HeightSpecification = LayoutParamPolicies.WrapContent,
-                };
-
-                if (scrollableBase != null)
-                {
-                    Remove(scrollableBase);
-                    scrollableBase.Dispose();
-                }
-
-                scrollableBase = new Oobe.Common.Controls.ScrollableBase
-                {
-                    ClippingMode = ClippingModeType.Disabled,
-                    WidthResizePolicy = ResizePolicyType.FillToParent,
-                    SnapToPage = true,
-                    ScrollingDirection = ScrollableBase.Direction.Vertical,
-                    ScrollEnabled = true,
-                    SizeHeight = CalculateScrollerSize(),
-                    FlickDistanceMultiplierRange = new Vector2(4.6f, 5.8f),
-                    EventsView = this,
-                };
-
-                scrollableBase.ScrollEvent += (sender, args) =>
-                {
-                    UpdateItems();
-                };
-                scrollableBase.ScrollAnimationEndEvent += (sender, args) =>
-                {
-                    if (selectedItemIndex != scrollableBase.CurrentPage)
-                    {
-                        selectedItemIndex = scrollableBase.CurrentPage;
-                        SelectedItemChanged?.Invoke(this, null);
-                    }
-                };
-
-                if (upperLine != null)
-                {
-                    Remove(upperLine);
-                    upperLine.Dispose();
-                }
-
-                upperLine = new View()
-                {
-                    BackgroundColor = Style.LinesColor,
-                    Size2D = new Size2D(0, 1),
-                    WidthResizePolicy = ResizePolicyType.FillToParent,
-                    Position2D = new Position2D(0, 93),
-                    Opacity = 0.95f,
-                };
-
-                if (lowerLine != null)
-                {
-                    Remove(lowerLine);
-                    lowerLine.Dispose();
-                }
-
-                lowerLine = new View()
-                {
-                    BackgroundColor = Style.LinesColor,
-                    Size2D = new Size2D(0, 1),
-                    WidthResizePolicy = ResizePolicyType.FillToParent,
-                    Position2D = new Position2D(0, 156),
-                    Opacity = 0.95f,
-                };
-
-                scrollableBase.Add(itemsListView);
-
-                Add(upperLine);
-                Add(scrollableBase);
-                Add(lowerLine);
-            }
-        }
-
-        protected override void OnUpdate()
-        {
-            base.OnUpdate();
-            UpdateItems();
-        }
-
-        protected override void Dispose(Tizen.NUI.DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                // Dispose all containing widgets
-                scrollableBase.Dispose();
-                upperLine.Dispose();
-                lowerLine.Dispose();
-            }
-
-            base.Dispose(type);
-        }
-
-        private float CalculateScrollerSize()
-        {
-            float size = 0.0f;
-
-            size += Style.CenterText?.Size2D?.Height ?? 0.0f;
-            size += (float)Style.CenterText?.Margin?.Top;
-            size += (float)Style.CenterText?.Margin?.Bottom;
-
-            return size;
-        }
-
-        private View CreateItemView(CarouselPickerItemData item)
-        {
-            var view = new TextLabel();
-
-            // TODO for some reason TextLabel(Style.CenterText)
-            // or view.ApplyStyle(Style.CenterText) do not work here so set
-            // everything manually
-            // var view = new TextLabel(Style.CenterText);
-            // view.ApplyStyle(Style.CenterText);
-            float? pixelSize = null;
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using Oobe.Common.Utils;\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+using Tizen.NUI.Binding;\r
+using Tizen.NUI.Components;\r
+\r
+namespace Oobe.Common.Controls\r
+{\r
+    public class CarouselPicker : Control\r
+    {\r
+        private Oobe.Common.Controls.ScrollableBase scrollableBase;\r
+        private View itemsListView;\r
+        private View upperLine;\r
+        private View lowerLine;\r
+\r
+        private Vector3 textCenterColorHSV = new Vector3();\r
+        private Vector3 textOuterColorHSV = new Vector3();\r
+\r
+        private float textCenterOpacity;\r
+        private float textOuterOpacity;\r
+        private int selectedItemIndex = 0;\r
+\r
+        private List<CarouselPickerItemData> items = new List<CarouselPickerItemData>();\r
+\r
+        public CarouselPicker()\r
+            : base()\r
+        {\r
+        }\r
+\r
+        public CarouselPicker(CarouselPickerStyle style)\r
+            : base(style)\r
+        {\r
+            // TODO fix a bug with style not properly applied by base class\r
+            ApplyStyle(style);\r
+        }\r
+\r
+        public event EventHandler SelectedItemChanged;\r
+\r
+        public new CarouselPickerStyle Style => ViewStyle as CarouselPickerStyle;\r
+\r
+        public int SelectedItemIndex\r
+        {\r
+            get\r
+            {\r
+                return selectedItemIndex;\r
+            }\r
+\r
+            set\r
+            {\r
+                // always scroll\r
+                scrollableBase.ScrollToIndex(value);\r
+                if (selectedItemIndex != value)\r
+                {\r
+                    SelectedItemChanged?.Invoke(this, null);\r
+                    selectedItemIndex = value;\r
+                }\r
+            }\r
+        }\r
+\r
+        public void AddItem(CarouselPickerItemData item)\r
+        {\r
+            var view = CreateItemView(item);\r
+            itemsListView.Add(view);\r
+            items.Add(item);\r
+        }\r
+\r
+        public void RemoveItem(CarouselPickerItemData item)\r
+        {\r
+            var index = items.IndexOf(item);\r
+            items.Remove(item);\r
+            itemsListView.Children.RemoveAt(index);\r
+        }\r
+\r
+        public override void ApplyStyle(ViewStyle viewStyle)\r
+        {\r
+            base.ApplyStyle(viewStyle);\r
+\r
+            CarouselPickerStyle style = viewStyle as CarouselPickerStyle;\r
+\r
+            if (style != null)\r
+            {\r
+                Layout = new LinearLayout\r
+                {\r
+                    LinearOrientation = LinearLayout.Orientation.Vertical,\r
+                    LinearAlignment = LinearLayout.Alignment.Center,\r
+                };\r
+                ClippingMode = ClippingModeType.ClipToBoundingBox;\r
+\r
+                // Animatable properties\r
+                textCenterColorHSV = Style.CenterText?.TextColor?.All?.ToHSV() ?? new Vector3();\r
+                textCenterOpacity = Style.CenterText?.Opacity?.All ?? 1.0f;\r
+\r
+                textOuterColorHSV = Style.OuterText?.TextColor?.All?.ToHSV() ?? new Vector3();\r
+                textOuterOpacity = Style.OuterText?.Opacity?.All ?? 1.0f;\r
+\r
+                if (itemsListView != null)\r
+                {\r
+                    scrollableBase?.Remove(itemsListView);\r
+                    itemsListView.Dispose();\r
+                }\r
+\r
+                itemsListView = new View\r
+                {\r
+                    Layout = new LinearLayout\r
+                    {\r
+                        LinearOrientation = LinearLayout.Orientation.Vertical,\r
+                    },\r
+                    WidthSpecification = LayoutParamPolicies.MatchParent,\r
+                    HeightSpecification = LayoutParamPolicies.WrapContent,\r
+                };\r
+\r
+                if (scrollableBase != null)\r
+                {\r
+                    Remove(scrollableBase);\r
+                    scrollableBase.Dispose();\r
+                }\r
+\r
+                scrollableBase = new Oobe.Common.Controls.ScrollableBase\r
+                {\r
+                    ClippingMode = ClippingModeType.Disabled,\r
+                    WidthResizePolicy = ResizePolicyType.FillToParent,\r
+                    SnapToPage = true,\r
+                    ScrollingDirection = ScrollableBase.Direction.Vertical,\r
+                    ScrollEnabled = true,\r
+                    SizeHeight = CalculateScrollerSize(),\r
+                    FlickDistanceMultiplierRange = new Vector2(4.6f, 5.8f),\r
+                    EventsView = this,\r
+                };\r
+\r
+                scrollableBase.ScrollEvent += (sender, args) =>\r
+                {\r
+                    UpdateItems();\r
+                };\r
+                scrollableBase.ScrollAnimationEndEvent += (sender, args) =>\r
+                {\r
+                    if (selectedItemIndex != scrollableBase.CurrentPage)\r
+                    {\r
+                        selectedItemIndex = scrollableBase.CurrentPage;\r
+                        SelectedItemChanged?.Invoke(this, null);\r
+                    }\r
+                };\r
+\r
+                if (upperLine != null)\r
+                {\r
+                    Remove(upperLine);\r
+                    upperLine.Dispose();\r
+                }\r
+\r
+                upperLine = new View()\r
+                {\r
+                    BackgroundColor = Style.LinesColor,\r
+                    Size2D = DpUtils.ToPixels(new Size2D(0, 1)),\r
+                    WidthResizePolicy = ResizePolicyType.FillToParent,\r
+                    Position2D = DpUtils.ToPixels(new Position2D(0, 93)),\r
+                    Opacity = 0.95f,\r
+                };\r
+\r
+                if (lowerLine != null)\r
+                {\r
+                    Remove(lowerLine);\r
+                    lowerLine.Dispose();\r
+                }\r
+\r
+                lowerLine = new View()\r
+                {\r
+                    BackgroundColor = Style.LinesColor,\r
+                    Size2D = DpUtils.ToPixels(new Size2D(0, 1)),\r
+                    WidthResizePolicy = ResizePolicyType.FillToParent,\r
+                    Position2D = DpUtils.ToPixels(new Position2D(0, 93)),\r
+                    Opacity = 0.95f,\r
+                };\r
+\r
+                scrollableBase.Add(itemsListView);\r
+\r
+                Add(upperLine);\r
+                Add(scrollableBase);\r
+                Add(lowerLine);\r
+            }\r
+        }\r
+\r
+        protected override void OnUpdate()\r
+        {\r
+            base.OnUpdate();\r
+            UpdateItems();\r
+        }\r
+\r
+        protected override void Dispose(Tizen.NUI.DisposeTypes type)\r
+        {\r
+            if (disposed)\r
+            {\r
+                return;\r
+            }\r
+\r
+            if (type == DisposeTypes.Explicit)\r
+            {\r
+                // Dispose all containing widgets\r
+                scrollableBase.Dispose();\r
+                upperLine.Dispose();\r
+                lowerLine.Dispose();\r
+            }\r
+\r
+            base.Dispose(type);\r
+        }\r
+\r
+        private float CalculateScrollerSize()\r
+        {\r
+            float size = 0.0f;\r
+\r
+            size += Style.CenterText?.Size2D?.Height ?? 0.0f;\r
+            size += (float)Style.CenterText?.Margin?.Top;\r
+            size += (float)Style.CenterText?.Margin?.Bottom;\r
+\r
+            return size;\r
+        }\r
+\r
+        private View CreateItemView(CarouselPickerItemData item)\r
+        {\r
+            var view = new TextLabel();\r
+\r
+            // TODO for some reason TextLabel(Style.CenterText)\r
+            // or view.ApplyStyle(Style.CenterText) do not work here so set\r
+            // everything manually\r
+            // var view = new TextLabel(Style.CenterText);\r
+            // view.ApplyStyle(Style.CenterText);\r
+            float? pixelSize = null;\r
             Style.CenterText?.PixelSize.GetValue(ControlState.Normal, out pixelSize);\r
 \r
-            view.Text = item.Text;
-            view.TranslatableText = item.TranslatableText;
-            view.Size2D = Style.CenterText?.Size2D ?? new Size2D();
+            view.Text = item.Text;\r
+            view.TranslatableText = item.TranslatableText;\r
+            view.Size2D = Style.CenterText?.Size2D ?? new Size2D();\r
             view.PixelSize = pixelSize ?? 10.0f;\r
-            view.Margin = Style.CenterText?.Margin ?? new Extents();
-            view.HorizontalAlignment = Style.CenterText?.HorizontalAlignment ?? HorizontalAlignment.Center;
-            view.VerticalAlignment = Style.CenterText?.VerticalAlignment ?? VerticalAlignment.Center;
-            view.Opacity = Style.CenterText?.Opacity?.All ?? 1.0f;
-
-            // TODO other properties?
-            return view;
-        }
-
-        private void CreateMainList()
-        {
-        }
-
-        private Vector3 ScaleVector(Vector3 from, Vector3 to, float percent)
-        {
-            percent = Math.Clamp(percent, 0.0f, 1.0f);
-
-            float a = from[0] + ((to[0] - from[0]) * percent);
-            float b = from[1] + ((to[1] - from[1]) * percent);
-            float c = from[2] + ((to[2] - from[2]) * percent);
-
-            return new Vector3(a, b, c);
-        }
-
-        private float ScaleScalar(float from, float to, float percent)
-        {
-            percent = Math.Clamp(percent, 0.0f, 1.0f);
-            return from + ((to - from) * percent);
-        }
-
-        private void UpdateItems()
-        {
-            float mid = itemsListView.PositionY - (int)(scrollableBase.Size2D.Height / 2.0f);
-            int threshold = 80; // after this value the color will become outer
-
-            foreach (View view in itemsListView.Children)
-            {
-                TextLabel itemView = view as TextLabel;
-                if (itemView == null)
-                {
-                    continue;
-                }
-
-                float viewMid = view.PositionY + (view.Size2D.Height / 2.0f);
-                float percent = Math.Abs(viewMid + mid) / threshold;
-
-                itemView.Opacity = ScaleScalar(textCenterOpacity, textOuterOpacity, percent);
-                itemView.TextColor = ColorUtils.ColorFromHSV(ScaleVector(textCenterColorHSV, textOuterColorHSV, percent));
-            }
-        }
-    }
-}
+            view.Margin = Style.CenterText?.Margin ?? new Extents();\r
+            view.HorizontalAlignment = Style.CenterText?.HorizontalAlignment ?? HorizontalAlignment.Center;\r
+            view.VerticalAlignment = Style.CenterText?.VerticalAlignment ?? VerticalAlignment.Center;\r
+            view.Opacity = Style.CenterText?.Opacity?.All ?? 1.0f;\r
+\r
+            // TODO other properties?\r
+            return view;\r
+        }\r
+\r
+        private void CreateMainList()\r
+        {\r
+        }\r
+\r
+        private Vector3 ScaleVector(Vector3 from, Vector3 to, float percent)\r
+        {\r
+            percent = Math.Clamp(percent, 0.0f, 1.0f);\r
+\r
+            float a = from[0] + ((to[0] - from[0]) * percent);\r
+            float b = from[1] + ((to[1] - from[1]) * percent);\r
+            float c = from[2] + ((to[2] - from[2]) * percent);\r
+\r
+            return new Vector3(a, b, c);\r
+        }\r
+\r
+        private float ScaleScalar(float from, float to, float percent)\r
+        {\r
+            percent = Math.Clamp(percent, 0.0f, 1.0f);\r
+            return from + ((to - from) * percent);\r
+        }\r
+\r
+        private void UpdateItems()\r
+        {\r
+            float mid = itemsListView.PositionY - (int)(scrollableBase.Size2D.Height / 2.0f);\r
+            int threshold = 80; // after this value the color will become outer\r
+\r
+            foreach (View view in itemsListView.Children)\r
+            {\r
+                TextLabel itemView = view as TextLabel;\r
+                if (itemView == null)\r
+                {\r
+                    continue;\r
+                }\r
+\r
+                float viewMid = view.PositionY + (view.Size2D.Height / 2.0f);\r
+                float percent = Math.Abs(viewMid + mid) / threshold;\r
+\r
+                itemView.Opacity = ScaleScalar(textCenterOpacity, textOuterOpacity, percent);\r
+                itemView.TextColor = ColorUtils.ColorFromHSV(ScaleVector(textCenterColorHSV, textOuterColorHSV, percent));\r
+            }\r
+        }\r
+    }\r
+}\r
index e05914950ba2fcca79c4ea66e55692349438f6b3..c7ea57cdac5e44b4acca72ada95bddc111f57f34 100644 (file)
@@ -8,7 +8,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="9.0.0.16249">
+    <PackageReference Include="Tizen.NET" Version="9.0.0.16715">
       <ExcludeAssets>Runtime</ExcludeAssets>
     </PackageReference>
     <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
index 332339eb27570e6623ca46e542f0a6fb695c656a..126d1309e65e421133c4636180eb93ec5930e19d 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using Oobe.Common.Styles;
+using Oobe.Common.Utils;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;
@@ -47,12 +48,12 @@ namespace Oobe.Common.Pages
                 PositionUsesPivotPoint = true,
                 PivotPoint = new Position(0.5f, 0.0f),
                 ParentOrigin = new Position(0.5f, 0.167f),
-                Size2D = new Size2D(0, 48),
+                Size2D = DpUtils.ToPixels(new Size2D(0, 48)),
                 WidthResizePolicy = ResizePolicyType.FillToParent,
                 TextColor = new Color(0, 20.0f / 255.0f, 71.0f / 255.0f, 1.0f),
                 HorizontalAlignment = HorizontalAlignment.Center,
                 Ellipsis = false,
-                PixelSize = 40.0f,
+                PixelSize = DpUtils.ToPixels(40.0f),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddLightFontStyle(),
             };
index 62fedbef7850ec6477d8dbd50cfd18a3fa258b47..f5e1cd6bb968e0edcb250e88b0c7ffb9647bd69f 100644 (file)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+using Oobe.Common.Utils;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;
@@ -46,8 +47,8 @@ namespace Oobe.Common.Styles
             {
                 PixelSize = new Selector<float?>
                 {
-                    Normal = 22.0f,
-                    Pressed = 24.0f,
+                    Normal = DpUtils.ToPixels(22.0f),
+                    Pressed = DpUtils.ToPixels(24.0f),
                 },
                 EnableMarkup = true,
                 TranslatableText = "PREVIOUS",
@@ -58,7 +59,7 @@ namespace Oobe.Common.Styles
                 },
                 FontFamily = GetNavigationFont(),
             },
-            Size2D = new Size2D(240, 72),
+            Size2D = DpUtils.ToPixels(new Size2D(240, 72)),
         };
 
         private static ButtonStyle GetSkipButtonStyle()
@@ -80,14 +81,14 @@ namespace Oobe.Common.Styles
             {
                 PixelSize = new Selector<float?>
                 {
-                    Normal = 22.0f,
-                    Pressed = 24.0f,
+                    Normal = DpUtils.ToPixels(22.0f),
+                    Pressed = DpUtils.ToPixels(24.0f),
                 },
                 TextColor = Color.White,
                 TranslatableText = "CONTINUE",
                 FontFamily = GetNavigationFont(),
             },
-            Size2D = new Size2D(240, 72),
+            Size2D = DpUtils.ToPixels(new Size2D(240, 72)),
         };
 
         private static Selector<string> GetNavigationFont()
index b615222e87832778ef1e479b90f174d20d928cda..7e0dcd133e7892e4fbe2b6c25b28607bb63d33e7 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using Oobe.Common.Controls;
+using Oobe.Common.Utils;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;
@@ -27,18 +28,18 @@ namespace Oobe.Common.Styles
         {
             CenterText = new TextLabelStyle
             {
-                Size2D = new Size2D(312, 26),
-                PixelSize = 20.0f,
-                Margin = new Extents(24, 24, 16, 16),
+                Size2D = DpUtils.ToPixels(new Size2D(312, 26)),
+                PixelSize = DpUtils.ToPixels(20.0f),
+                Margin = DpUtils.ToPixels(new Extents(24, 24, 16, 16)),
                 HorizontalAlignment = HorizontalAlignment.Center,
                 TextColor = new Color(0, 20.0f / 255.0f, 71.0f / 255.0f, 1.0f),
                 Opacity = 1.0f,
             },
             OuterText = new TextLabelStyle
             {
-                Size2D = new Size2D(312, 26),
-                PixelSize = 20.0f,
-                Margin = new Extents(24, 24, 16, 16),
+                Size2D = DpUtils.ToPixels(new Size2D(312, 26)),
+                PixelSize = DpUtils.ToPixels(20.0f),
+                Margin = DpUtils.ToPixels(new Extents(24, 24, 16, 16)),
                 HorizontalAlignment = HorizontalAlignment.Center,
                 TextColor = new Color(195.0f / 255.0f, 202.0f / 255.0f, 210.0f / 255.0f, 1.0f),
                 Opacity = 0.4f,
diff --git a/Oobe/Oobe.Common/Utils/DpUtils.cs b/Oobe/Oobe.Common/Utils/DpUtils.cs
new file mode 100644 (file)
index 0000000..25691df
--- /dev/null
@@ -0,0 +1,70 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI;
+
+namespace Oobe.Common.Utils
+{
+    public static class DpUtils
+    {
+        private const float DefaultFactor = 2.75f;
+        public static int ToPixels(int dp)
+        {
+            return (int)Math.Round(DpTypeConverter.Instance.ConvertToPixel(dp / DefaultFactor), MidpointRounding.AwayFromZero);
+        }
+        public static ushort ToPixels(ushort dp)
+        {
+            return (ushort)Math.Round(DpTypeConverter.Instance.ConvertToPixel(dp / DefaultFactor), MidpointRounding.AwayFromZero);
+        }
+
+        public static float ToPixels(float dp)
+        {
+            return (float)DpTypeConverter.Instance.ConvertToPixel(dp / DefaultFactor);
+        }
+
+        public static Size2D ToPixels(Size2D dp)
+        {
+            return new Size2D(ToPixels(dp.Width), ToPixels(dp.Height));
+        }
+
+        public static Position2D ToPixels(Position2D dp)
+        {
+            return new Position2D(ToPixels(dp.X), ToPixels(dp.Y));
+        }
+
+        public static Extents ToPixels(Extents dp)
+        {
+            return new Extents(ToPixels(dp.Start), ToPixels(dp.End), ToPixels(dp.Top), ToPixels(dp.Bottom));
+        }
+
+        public static int FromPixels(int px)
+        {
+            return (int)Math.Round(DpTypeConverter.Instance.ConvertFromPixel(px) * DefaultFactor, MidpointRounding.ToZero);
+        }
+
+        public static ushort FromPixels(ushort px)
+        {
+            return (ushort)Math.Round(DpTypeConverter.Instance.ConvertFromPixel(px) * DefaultFactor, MidpointRounding.ToZero);
+        }
+
+        public static float FromPixels(float px)
+        {
+            return (float)DpTypeConverter.Instance.ConvertFromPixel(px) * DefaultFactor;
+        }
+
+        public static Size2D FromPixels(Size2D px)
+        {
+            return new Size2D(FromPixels(px.Width), FromPixels(px.Height));
+        }
+        public static Position2D FromPixels(Position2D px)
+        {
+            return new Position2D(FromPixels(px.X), FromPixels(px.Y));
+        }
+        public static Extents FromPixels(Extents px)
+        {
+            return new Extents(FromPixels(px.Start), FromPixels(px.End), FromPixels(px.Top), FromPixels(px.Bottom));
+        }
+    }
+}
index f3a7480f90323f6221007b1d3f74d4e8fc5208c9..6f219732b72d8861bae7a773460941e6b9ec7533 100644 (file)
@@ -51,7 +51,7 @@ namespace Oobe.Language
             container.Title.TranslatableText = "CHOOSE_LANGUAGE";
 
             var carousel = new CarouselPicker(CarouselPickerStyles.Default);
-            carousel.Size2D = new Size2D(360, 249);
+            carousel.Size2D = DpUtils.ToPixels(new Size2D(360, 249));
 
             foreach (LanguageInfo info in manager.Languages)
             {
index 4f488fecc35699fa6dadd76b3ad1065b8053d69b..1db3a9d6c0743fad71c020cb698dc54e9cd9f05b 100644 (file)
@@ -8,7 +8,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="9.0.0.16249">
+    <PackageReference Include="Tizen.NET" Version="9.0.0.16715">
       <ExcludeAssets>Runtime</ExcludeAssets>
     </PackageReference>
     <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
index 303023440825d0f3e8675c12cdc6ebb2d9fe6aa5..3ddff2b24f7a978ecb51826bec55f208e4e4abd2 100644 (file)
@@ -8,7 +8,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="9.0.0.16249">
+    <PackageReference Include="Tizen.NET" Version="9.0.0.16715">
       <ExcludeAssets>Runtime</ExcludeAssets>
     </PackageReference>
     <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
index 11f6d02630b00fbe4da12dd22eb150bd0f54daa2..d32c3e52d204a21bc2709495332ce14582ed5690 100644 (file)
@@ -8,7 +8,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="9.0.0.16249">
+    <PackageReference Include="Tizen.NET" Version="9.0.0.16715">
       <ExcludeAssets>Runtime</ExcludeAssets>
     </PackageReference>
     <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
index 061453e0a027fb11d9889d8088892098d776dcf6..59b887ec56b36e15fced30d733435c538cfbbff8 100644 (file)
@@ -1,19 +1,19 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
 using Oobe.Common.Interfaces;\r
 using Oobe.Common.Pages;\r
 using Oobe.Terms.Model;\r
@@ -33,7 +33,7 @@ namespace Oobe.Terms
 \r
         public override BasePage CreateView(IProcessNavigation nav)\r
         {\r
-            return new TermsView(nav, provider);
+            return new TermsView(nav, provider);\r
         }\r
     }\r
 }\r
index 82def94726b939c5d0f61b4dd5bb9602e29f48b4..2817c24d999a552ab593bb346aeecd8bd7ef4e7e 100644 (file)
@@ -52,7 +52,7 @@ namespace Oobe.Terms.Views
                 Layout = new LinearLayout
                 {
                     LinearOrientation = LinearLayout.Orientation.Vertical,
-                    CellPadding = new Size2D(0, 12),
+                    CellPadding = DpUtils.ToPixels(new Size2D(0, 12)),
                 },
             };
 
@@ -75,7 +75,7 @@ namespace Oobe.Terms.Views
 
             var scrollerContent = new View
             {
-                Padding = new Extents(64, 64, 0, 0),
+                Padding = DpUtils.ToPixels(new Extents(64, 64, 0, 0)),
                 WidthResizePolicy = ResizePolicyType.FillToParent,
                 HeightResizePolicy = ResizePolicyType.FitToChildren,
                 Layout = new LinearLayout(),
@@ -85,7 +85,7 @@ namespace Oobe.Terms.Views
             // performance on ScrollableBase
             termsContent = new TextLabel();
             termsContent.TextColor = new Color(0, 12.0f / 255.0f, 43.0f / 255.0f, 1.0f);
-            termsContent.PixelSize = 18.0f;
+            termsContent.PixelSize = DpUtils.ToPixels(18.0f);
             termsContent.FontFamily = "BreezeSans";
             termsContent.Text = terms.LoadTerms();
             termsContent.LineWrapMode = LineWrapMode.Character;
@@ -121,8 +121,8 @@ namespace Oobe.Terms.Views
             guide.TranslatableText = "YOU_MUST_SCROLL_DOWN_AND_READ_THE_WHOLE_TEXT_ABOVE";
 
             agreeSwitch = new Switch(SwitchStyles.IHaveReadAndAgreeSwitchStyle);
-            agreeSwitch.Size2D = new Size2D(24, 24);
-            agreeSwitch.Margin = new Extents(0, 0, 0, 2);
+            agreeSwitch.Size2D = DpUtils.ToPixels(new Size2D(24, 24));
+            agreeSwitch.Margin = DpUtils.ToPixels(new Extents(0, 0, 0, 2));
             agreeSwitch.IsSelected = false;
             agreeSwitch.IsEnabled = false;
             agreeSwitch.Clicked += (obj, args) =>
@@ -136,12 +136,12 @@ namespace Oobe.Terms.Views
 
             var footnote = new View
             {
-                Padding = new Extents(64, 64, 0, 0),
+                Padding = DpUtils.ToPixels(new Extents(64, 64, 0, 0)),
                 Layout = new LinearLayout
                 {
                     LinearOrientation = LinearLayout.Orientation.Horizontal,
                     LinearAlignment = LinearLayout.Alignment.Bottom,
-                    CellPadding = new Size2D(16, 0),
+                    CellPadding = DpUtils.ToPixels(new Size2D(16, 0)),
                 },
             };
 
@@ -290,7 +290,7 @@ namespace Oobe.Terms.Views
 
         private Size2D CalculateTermsViewSize()
         {
-            var referenceTermsSize = new Size2D(1072, 316);
+            var referenceTermsSize = DpUtils.ToPixels(new Size2D(1072, 316));
             return Config.ScaledSize(referenceTermsSize);
         }
     }
index fe4fd2c47b67f8f3e8994b13c075f1d2a0e43b67..4b5f88223164355300edf8381f7919f0ee9e988c 100644 (file)
@@ -8,7 +8,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="9.0.0.16249">
+    <PackageReference Include="Tizen.NET" Version="9.0.0.16715">
       <ExcludeAssets>Runtime</ExcludeAssets>
     </PackageReference>
     <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
index 88977964bce2c67c575c9dc09b217271db9563ee..1ecd81c3ed325a20f5f89b40ce985bf28d39f3b9 100644 (file)
@@ -21,6 +21,7 @@ using System.Collections.ObjectModel;
 using System.Linq;
 using System.Threading.Tasks;
 using Oobe.Common.Styles;
+using Oobe.Common.Utils;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;
@@ -72,7 +73,7 @@ namespace Oobe.Wifi.Controls
                 {
                     scrollableBase = new ScrollableBase()
                     {
-                        Size = new Size(width, height),
+                        Size = DpUtils.ToPixels(new Size(width, height)),
                         ScrollingDirection = ScrollableBase.Direction.Vertical,
                         Scrollbar = new Scrollbar(ScrollbarStyles.Default),
                         HideScrollbar = false,
index 995b5be3dfab8b73bc8a4e0f34af14827cbe54a5..af0a218474128dbc1c016ca197f173fdbd581f71 100644 (file)
@@ -49,9 +49,9 @@ namespace Oobe.Wifi.Controls.Wifi
         private string backgroundImagePath = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "08_popup_body.png");
         private string arrowImagePath = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "12_back_active.png");
 
-        private int labelFontSize = 14;
-        private int textFontSize = 22;
-        private int passwordFontSize = 22;
+        private int labelFontSize = DpUtils.ToPixels(14);
+        private int textFontSize = DpUtils.ToPixels(22);
+        private int passwordFontSize = DpUtils.ToPixels(22);
 
         public AddNewNetworkPupup()
         {
@@ -77,18 +77,18 @@ namespace Oobe.Wifi.Controls.Wifi
 
         private static Color SmallTextColor => new Color(0.0f, 0xC / 255.0f, 0x2B / 255.0f, 1.0f);
 
-        private static Size LabelSize => new Size(600, 19);
+        private static Size LabelSize => DpUtils.ToPixels(new Size(600, 19));
 
-        private static Size TextControlSize => new Size(680, 27);
+        private static Size TextControlSize => DpUtils.ToPixels(new Size(680, 27));
 
-        private static Size PasswordControlSize => new Size(583, 27);
+        private static Size PasswordControlSize => DpUtils.ToPixels(new Size(583, 27));
 
         private TextLabel CreateTextLabel(string translatableText, Position2D position = null)
         {
             position ??= new Position2D();
             return new TextLabel
             {
-                Position = position,
+                Position = DpUtils.ToPixels(position),
                 Size = LabelSize,
                 PixelSize = labelFontSize,
                 TranslatableText = translatableText,
@@ -105,7 +105,7 @@ namespace Oobe.Wifi.Controls.Wifi
             position ??= new Position2D();
             var textField = new TextField
             {
-                Position = position,
+                Position = DpUtils.ToPixels(position),
                 Size = TextControlSize,
                 PixelSize = textFontSize,
                 FontFamily = "BreezeSans",
@@ -124,8 +124,8 @@ namespace Oobe.Wifi.Controls.Wifi
             size ??= new Size2D(728, 1);
             return new View()
             {
-                Position = position,
-                Size = size,
+                Position = DpUtils.ToPixels(position),
+                Size = DpUtils.ToPixels(size),
                 BackgroundColor = new Color(0xC3 / 255.0f, 0xCA / 255.0f, 0xD2 / 255.0f, 1.0f),
             };
         }
@@ -135,7 +135,7 @@ namespace Oobe.Wifi.Controls.Wifi
             position ??= new Position2D();
             var passwordEntry = new PasswordEntry
             {
-                Position = position,
+                Position = DpUtils.ToPixels(position),
                 Size = PasswordControlSize,
                 PixelSize = passwordFontSize,
                 FontFamily = "BreezeSans",
@@ -154,8 +154,8 @@ namespace Oobe.Wifi.Controls.Wifi
             position ??= new Position2D();
             var button = new Button(ButtonStyles.Reveal)
             {
-                Size = new Size(32, 32),
-                Position = position,
+                Size = DpUtils.ToPixels(new Size(32, 32)),
+                Position = DpUtils.ToPixels(position),
                 IsSelectable = true,
             };
             button.Clicked += (s, e) =>
@@ -170,9 +170,9 @@ namespace Oobe.Wifi.Controls.Wifi
             this.BackgroundImage = backgroundImagePath;
             titleLabel = new TextLabel
             {
-                Position = new Position2D(104, 24),
-                Size = new Size(600, 34),
-                PixelSize = 26,
+                Position = DpUtils.ToPixels(new Position2D(104, 24)),
+                Size = DpUtils.ToPixels(new Size(600, 34)),
+                PixelSize = DpUtils.ToPixels(26),
                 TranslatableText = "WIFI_ADD_NETWORK",
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddLightFontStyle(),
@@ -193,14 +193,14 @@ namespace Oobe.Wifi.Controls.Wifi
 
             cancelButton = new Button(ButtonStyles.Cancel)
             {
-                Size = new Size(240, 72),
+                Size = DpUtils.ToPixels(new Size(240, 72)),
             };
             cancelButton.Clicked += (s, e) => OnDismiss?.Invoke();
             this.Add(cancelButton);
 
             addButton = new Button(ButtonStyles.OK)
             {
-                Size = new Size(240, 72),
+                Size = DpUtils.ToPixels(new Size(240, 72)),
                 TranslatableText = "WIFI_ADD",
             };
             addButton.Clicked += async (s, e) =>
@@ -295,7 +295,7 @@ namespace Oobe.Wifi.Controls.Wifi
             failureLabel = new TextLabel
             {
                 Size = new Size2D(),
-                PixelSize = 12,
+                PixelSize = DpUtils.ToPixels(12),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddRegularFontStyle(),
                 TextColor = new Color(0xAA / 255.0f, 0x18 / 255.0f, 0x18 / 255.0f, 1.0f),
@@ -310,14 +310,14 @@ namespace Oobe.Wifi.Controls.Wifi
         {\r
             var view = new View()\r
             {\r
-                Size = new Size(728, 72),\r
-                Position2D = new Position2D(40, 148),\r
+                Size = DpUtils.ToPixels(new Size(728, 72)),\r
+                Position2D = DpUtils.ToPixels(new Position2D(40, 148)),\r
                 Layout = new AbsoluteLayout(),\r
             };\r
             selectedSecurityTypeLabel = new TextLabel()\r
             {\r
-                Size = new Size(200, 28),\r
-                Position = new Position2D(0, 23),
+                Size = DpUtils.ToPixels(new Size(200, 28)),\r
+                Position = DpUtils.ToPixels(new Position2D(0, 23)),
                 PixelSize = 22,\r
                 TranslatableText = currentSecurityType.GetUIName(),\r
                 FontStyle = new PropertyMap().AddRegularFontStyle(),\r
@@ -330,7 +330,7 @@ namespace Oobe.Wifi.Controls.Wifi
             view.Add(new View()\r
             {\r
                 BackgroundImage = arrowImagePath,\r
-                Position = new Position(696, 31),\r
+                Position = DpUtils.ToPixels(new Position(696, 31)),\r
             });\r
             securityTypeDetector = new TapGestureDetector();\r
             securityTypeDetector.Attach(view);\r
@@ -355,8 +355,8 @@ namespace Oobe.Wifi.Controls.Wifi
             Size = new Size(808, 343);
             Position = new Position2D(236, 118);
 
-            addButton.Position = new Position2D(488, ((int)Size.Height) - 96);
-            cancelButton.Position = new Position2D(80, ((int)Size.Height) - 96);
+            addButton.Position = DpUtils.ToPixels(new Position2D(488, ((int)Size.Height) - 96));
+            cancelButton.Position = DpUtils.ToPixels(new Position2D(80, ((int)Size.Height) - 96));
 
             if (!(usernameLabel is null))
             {
@@ -405,11 +405,11 @@ namespace Oobe.Wifi.Controls.Wifi
 
         private void ResetViewToPasswordOnly()
         {
-            Size = new Size2D(808, 412);
-            Position = new Position2D(236, 59);
+            Size = DpUtils.ToPixels(new Size2D(808, 412));
+            Position = DpUtils.ToPixels(new Position2D(236, 59));
 
-            addButton.Position = new Position2D(488, ((int)Size.Height) - 96);
-            cancelButton.Position = new Position2D(80, ((int)Size.Height) - 96);
+            addButton.Position = DpUtils.ToPixels(new Position2D(488, ((int)Size.Height) - 96));
+            cancelButton.Position = DpUtils.ToPixels(new Position2D(80, ((int)Size.Height) - 96));
 
             if (!(usernameLabel is null))
             {
@@ -450,20 +450,20 @@ namespace Oobe.Wifi.Controls.Wifi
                 this.Add(revealButton);
             }
 
-            passwordEntry.Position = new Position2D(40, 232);
-            passwordUnderline.Position = new Position2D(40, 258);
-            revealButton.Position = new Position2D(728, 232);
+            passwordEntry.Position = DpUtils.ToPixels(new Position2D(40, 232));
+            passwordUnderline.Position = DpUtils.ToPixels(new Position2D(40, 258));
+            revealButton.Position = DpUtils.ToPixels(new Position2D(728, 232));
 
             currentViewMode = NewNetworkViewMode.PasswordOnly;
         }
 
         private void ResetViewToUserPassword()
         {
-            Size = new Size2D(808, 440);
-            Position = new Position2D(236, 0);
+            Size = DpUtils.ToPixels(new Size2D(808, 440));
+            Position = DpUtils.ToPixels(new Position2D(236, 0));
 
-            addButton.Position = new Position2D(488, ((int)Size.Height) - 96);
-            cancelButton.Position = new Position2D(80, ((int)Size.Height) - 96);
+            addButton.Position = DpUtils.ToPixels(new Position2D(488, ((int)Size.Height) - 96));
+            cancelButton.Position = DpUtils.ToPixels(new Position2D(80, ((int)Size.Height) - 96));
 
             if (usernameLabel is null)
             {
@@ -501,12 +501,12 @@ namespace Oobe.Wifi.Controls.Wifi
                 this.Add(revealButton);
             }
 
-            usernameLabel.Position2D = new Position2D(104, 208);
-            usernameTextField.Position2D = new Position2D(121, 225);
-            usernameUnderline.Position2D = new Position2D(104, 251);
-            passwordEntry.Position2D = new Position2D(40, 232);
-            passwordUnderline.Position2D = new Position2D(40, 258);
-            revealButton.Position = new Position2D(728, 232);
+            usernameLabel.Position2D = DpUtils.ToPixels(new Position2D(104, 208));
+            usernameTextField.Position2D = DpUtils.ToPixels(new Position2D(121, 225));
+            usernameUnderline.Position2D = DpUtils.ToPixels(new Position2D(104, 251));
+            passwordEntry.Position2D = DpUtils.ToPixels(new Position2D(40, 232));
+            passwordUnderline.Position2D = DpUtils.ToPixels(new Position2D(40, 258));
+            revealButton.Position = DpUtils.ToPixels(new Position2D(728, 232));
 
             currentViewMode = NewNetworkViewMode.UserPassword;
         }
@@ -537,7 +537,7 @@ namespace Oobe.Wifi.Controls.Wifi
         {
             failureLabel.Show();
             failureLabel.TranslatableText = "WIFI_SSID_FAILURE";
-            failureLabel.Position2D = ssidTextField.Position2D + new Position2D(0, (int)ssidTextField.Size.Height);
+            failureLabel.Position2D = DpUtils.ToPixels(ssidTextField.Position2D + new Position2D(0, (int)ssidTextField.Size.Height));
         }
 
         private void ShowFailurePasswordLabel()
@@ -546,12 +546,12 @@ namespace Oobe.Wifi.Controls.Wifi
             if (currentViewMode == NewNetworkViewMode.NoPassword)
             {
                 failureLabel.TranslatableText = "WIFI_SSID_FAILURE";
-                failureLabel.Position2D = ssidTextField.Position2D + new Position2D(0, (int)ssidTextField.Size.Height);
+                failureLabel.Position2D = DpUtils.ToPixels(ssidTextField.Position2D + new Position2D(0, (int)ssidTextField.Size.Height));
             }
             else
             {
                 failureLabel.TranslatableText = "WIFI_SECUIRTY_KEY_FAILURE";
-                failureLabel.Position2D = passwordEntry.Position2D + new Position2D(0, (int)passwordEntry.Size.Height);
+                failureLabel.Position2D = DpUtils.ToPixels(passwordEntry.Position2D + new Position2D(0, (int)passwordEntry.Size.Height));
             }
         }
 
index f87a6c8bcdc0906a99d382265cfc6e541a334414..39c964170db7b9f058e18d991e331fe950d33b0d 100644 (file)
@@ -16,6 +16,7 @@
 
 using System;
 using Oobe.Common.Styles;
+using Oobe.Common.Utils;
 using Tizen.Network.WiFi;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
@@ -32,7 +33,7 @@ namespace Oobe.Wifi.Controls.Wifi
 
         public ApView()
         {
-            Size = new Size(WifiView.ListItemWidth, WifiView.ListItemHeight);
+            Size = DpUtils.ToPixels(new Size(WifiView.ListItemWidth, WifiView.ListItemHeight));
             Layout = new AbsoluteLayout();
         }
 
@@ -44,15 +45,15 @@ namespace Oobe.Wifi.Controls.Wifi
             {
                 range = new View()
                 {
-                    Position = new Position(39, 21),
+                    Position = DpUtils.ToPixels(new Position(39, 21)),
                     BackgroundImage = GetRangeImage(wifiAp),
                 };
                 this.Add(range);
 
                 this.Add(new TextLabel(wifiAp.NetworkInformation.Essid)
                 {
-                    Position = new Position(78, 17),
-                    PixelSize = 20f,
+                    Position = DpUtils.ToPixels(new Position(78, 17)),
+                    PixelSize = DpUtils.ToPixels(20f),
                     TextColor = new Color(0, 0x0C / 255f, 0x2B / 255f, 1.0f),
                     FontFamily = "BreezeSans",
                     FontStyle = new PropertyMap().AddLightFontStyle(),
@@ -61,8 +62,8 @@ namespace Oobe.Wifi.Controls.Wifi
                 detail = new TextLabel(GetDetailInfo(wifiAp))
                 {
                     WidthSpecification = LayoutParamPolicies.WrapContent,
-                    Position = new Position(79, 45),
-                    PixelSize = 14f,
+                    Position = DpUtils.ToPixels(new Position(79, 45)),
+                    PixelSize = DpUtils.ToPixels(14f),
                     TextColor = new Color(0, 0x0C / 255f, 0x2B / 255f, 1.0f),
                     FontFamily = "BreezeSans",
                     FontStyle = new PropertyMap().AddRegularFontStyle(),
index c0d966f74a98c7f17804129ce06a9cb066d38149..f7891cbc1c752526b733125bfae670f7fe1f6cf3 100644 (file)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+using Oobe.Common.Utils;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -51,8 +52,8 @@ namespace Oobe.Wifi.Controls.Wifi
             {
                 PixelSize = new Selector<float?>
                 {
-                    Normal = 22.0f,
-                    Pressed = 24.0f,
+                    Normal = DpUtils.ToPixels(22.0f),
+                    Pressed = DpUtils.ToPixels(24.0f),
                 },
                 EnableMarkup = true,
                 TranslatableText = "WIFI_CANCEL",
@@ -63,7 +64,7 @@ namespace Oobe.Wifi.Controls.Wifi
                 },
                 FontFamily = GetNavigationFont(),
             },
-            Size2D = new Size2D(240, 72),
+            Size2D = DpUtils.ToPixels(new Size2D(240, 72)),
         };
 
         private static ButtonStyle GetScanButtonStyle() => new ButtonStyle
@@ -74,7 +75,7 @@ namespace Oobe.Wifi.Controls.Wifi
                 Pressed = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_scan_pressed.png",
                 Disabled = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_scan_disabled.png",
             },
-            Size2D = new Size2D(72, 32),
+            Size2D = DpUtils.ToPixels(new Size2D(72, 32)),
         };
 
         private static ButtonStyle GetTurnOnOffButtonStyle() => new ButtonStyle
@@ -86,7 +87,7 @@ namespace Oobe.Wifi.Controls.Wifi
                 Selected = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_wifion.png",
                 DisabledSelected = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_wifion_disabled.png",
             },
-            Size2D = new Size2D(72, 32),
+            Size2D = DpUtils.ToPixels(new Size2D(72, 32)),
         };
 
         private static ButtonStyle GetAddNetworkButtonStyle() => new ButtonStyle
@@ -96,7 +97,7 @@ namespace Oobe.Wifi.Controls.Wifi
                 Normal = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_addnetwork.png",
                 Pressed = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_addnetwork_pressed.png",
             },
-            Size2D = new Size2D(42, 42),
+            Size2D = DpUtils.ToPixels(new Size2D(42, 42)),
         };
 
         private static ButtonStyle GetRevealButtonStyle() => new ButtonStyle
@@ -120,14 +121,14 @@ namespace Oobe.Wifi.Controls.Wifi
             {
                 PixelSize = new Selector<float?>
                 {
-                    Normal = 22.0f,
-                    Pressed = 24.0f,
+                    Normal = DpUtils.ToPixels(22.0f),
+                    Pressed = DpUtils.ToPixels(24.0f),
                 },
                 TextColor = Color.White,
                 TranslatableText = "WIFI_OK",
                 FontFamily = GetNavigationFont(),
             },
-            Size2D = new Size2D(240, 72),
+            Size2D = DpUtils.ToPixels(new Size2D(240, 72)),
         };
 
         private static Selector<string> GetNavigationFont()
index 3be907538891cde834c03a78a194dc693f22a52e..6e453942dac4702cccb8b79cca8e1c557b20f51e 100644 (file)
@@ -21,6 +21,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using Oobe.Common.Styles;
+using Oobe.Common.Utils;
 using Tizen.Network.WiFi;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
@@ -39,8 +40,8 @@ namespace Oobe.Wifi.Controls.Wifi
         {
             this.originalWifUISecurityType = wifUISecurityType;
             this.WifiUISecurityType = wifUISecurityType;
-            this.Size = new Size(808, 440);
-            this.Position = new Position(236, 140);
+            this.Size = DpUtils.ToPixels(new Size(808, 440));
+            this.Position = DpUtils.ToPixels(new Position(236, 140));
             this.BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "08_popup_body.png");
 
             InitializeStaticElements();
@@ -55,8 +56,8 @@ namespace Oobe.Wifi.Controls.Wifi
         {
             var titleLabel = new TextLabel()
             {
-                Position = new Position2D(80, 24),
-                Size = new Size(648, 34),
+                Position = DpUtils.ToPixels(new Position2D(80, 24)),
+                Size = DpUtils.ToPixels(new Size(648, 34)),
                 PixelSize = 26,
                 TranslatableText = "WIFI_CHOOSE_SECURITY_TYPE",
                 FontFamily = "BreezeSans",
@@ -69,8 +70,8 @@ namespace Oobe.Wifi.Controls.Wifi
 
             var cancelButton = new Button(ButtonStyles.Cancel)
             {
-                Position = new Position(80, 344),
-                Size = new Size(240, 72),
+                Position = DpUtils.ToPixels(new Position(80, 344)),
+                Size = DpUtils.ToPixels(new Size(240, 72)),
             };
             cancelButton.Clicked += (s, e) =>
             {
@@ -81,8 +82,8 @@ namespace Oobe.Wifi.Controls.Wifi
 
             var addButton = new Button(ButtonStyles.OK)
             {
-                Position = new Position(488, 344),
-                Size = new Size(240, 72),
+                Position = DpUtils.ToPixels(new Position(488, 344)),
+                Size = DpUtils.ToPixels(new Size(240, 72)),
                 TranslatableText = "WIFI_OK",
             };
 
index 4d7658709e0c90e34835eae3605fa3b797d648d4..f1e58df6d9aa04b020d54ca26202f47a849c7748 100644 (file)
@@ -16,6 +16,7 @@
 
 using System;
 using Oobe.Common.Styles;
+using Oobe.Common.Utils;
 using Tizen.Network.WiFi;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
@@ -29,7 +30,7 @@ namespace Oobe.Wifi.Controls.Wifi
 
         public SecurityTypeView(WifiUISecurityType wifiUISecurityType)
         {
-            Size = new Size(768, 64);
+            Size = DpUtils.ToPixels(new Size(768, 64));
             Layout = new AbsoluteLayout();
             this.WifiUISecurityType = wifiUISecurityType;
 
@@ -45,8 +46,8 @@ namespace Oobe.Wifi.Controls.Wifi
             Button = new RadioButton
             {
                 IsSelected = false,
-                Position = new Position(40, 20),
-                Size = new Size(24, 24),
+                Position = DpUtils.ToPixels(new Position(40, 20)),
+                Size = DpUtils.ToPixels(new Size(24, 24)),
                 CellHorizontalAlignment = HorizontalAlignmentType.Center,
                 CellVerticalAlignment = VerticalAlignmentType.Center,
             };
@@ -54,9 +55,9 @@ namespace Oobe.Wifi.Controls.Wifi
 
             descriptionTextLabel = new TextLabel
             {
-                Position = new Position(92, 19),
-                Size = new Size(648, 26),
-                PixelSize = 20,
+                Position = DpUtils.ToPixels(new Position(92, 19)),
+                Size = DpUtils.ToPixels(new Size(648, 26)),
+                PixelSize = DpUtils.ToPixels(20),
                 TranslatableText = WifiUISecurityType.GetUIName(),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddLightFontStyle(),
index 36423a753f9b52b7b81ea3261680288d7f8b0186..99c43a6146e930dbd9cac209e77e57166cd1d36f 100644 (file)
@@ -17,6 +17,7 @@
 using System;
 using System.Threading.Tasks;
 using Oobe.Common.Styles;
+using Oobe.Common.Utils;
 using Oobe.Wifi.Controls.Wifi;
 using Tizen.Network.WiFi;
 using Tizen.NUI;
@@ -41,25 +42,25 @@ namespace Oobe.Wifi.Controls.Wifi
         public WifiPasswordPopup(Tizen.Network.WiFi.WiFiAP wifiAp)
         {
             BackgroundImage = backgroundImagePath;
-            Size = new Size(808, 271);
-            Position = new Position(new Position2D(236, 116));
+            Size = DpUtils.ToPixels(new Size(808, 271));
+            Position2D = DpUtils.ToPixels(new Position2D(236, 116));
             this.wifiAp = wifiAp;
 
             this.Add(new View() // underline
             {
-                Size = new Size(672, 1),
-                Position = new Position(40, 116),
+                Size = DpUtils.ToPixels(new Size(672, 1)),
+                Position2D = DpUtils.ToPixels(new Position2D(40, 116)),
                 BackgroundColor = new Color(0xC3 / 255.0f, 0xCA / 255.0f, 0xD2 / 255.0f, 1.0f),
             });
 
             var titleLabel = new TextLabel
             {
-                Size = new Size(728, 33),
-                Position = new Position(40, 24),
+                Size = DpUtils.ToPixels(new Size(728, 33)),
+                Position2D = DpUtils.ToPixels(new Position2D(40, 24)),
 
                 // no translatableText because of dynamic content
                 Text = string.Format(Translations.WIFI_ENTER_PASSWORD_TO_JOIN, wifiAp.NetworkInformation.Essid),
-                PixelSize = 26,
+                PixelSize = DpUtils.ToPixels(26),
                 TextColor = new Color(0, 0x14 / 255.0f, 0x47 / 255.0f, 1.0f),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddRegularFontStyle(),
@@ -70,10 +71,10 @@ namespace Oobe.Wifi.Controls.Wifi
 
             passwordEntry = new PasswordEntry()
             {
-                Size = new Size(624, 27),
-                Position = new Position(40, 90),
+                Size = DpUtils.ToPixels(new Size(624, 27)),
+                Position = DpUtils.ToPixels(new Position(40, 90)),
                 MaxLength = MaxPasswordLength,
-                PixelSize = 22,
+                PixelSize = DpUtils.ToPixels(22),
                 TextColor = new Color(0, 0x0C / 255.0f, 0x2B / 255.0f, 1.0f),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddRegularFontStyle(),
@@ -86,10 +87,10 @@ namespace Oobe.Wifi.Controls.Wifi
 
             connectionFailure = new TextLabel
             {
-                Size = new Size(624, 22),
-                Position = new Position(40, 117),
+                Size = DpUtils.ToPixels(new Size(624, 22)),
+                Position = DpUtils.ToPixels(new Position(40, 117)),
                 TranslatableText = "WIFI_INVALID_PASSWORD",
-                PixelSize = 18,
+                PixelSize = DpUtils.ToPixels(18),
                 TextColor = new Color(0xAA / 255.0f, 0x18 / 255.0f, 0x18 / 255.0f, 1.0f),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddRegularFontStyle(),
@@ -101,8 +102,8 @@ namespace Oobe.Wifi.Controls.Wifi
 
             revealButton = new Button(ButtonStyles.Reveal)
             {
-                Size = new Size(48, 48),
-                Position = new Position(720, 79),
+                Size = DpUtils.ToPixels(new Size(48, 48)),
+                Position = DpUtils.ToPixels(new Position(720, 79)),
                 IsSelectable = true,
             };
             revealButton.Clicked += (s, e) => TogglePasswordVisibility();
@@ -110,8 +111,8 @@ namespace Oobe.Wifi.Controls.Wifi
 
             cancelButton = new Button(ButtonStyles.Cancel)
             {
-                Size = new Size(240, 72),
-                Position = new Position(80, 175),
+                Size = DpUtils.ToPixels(new Size(240, 72)),
+                Position = DpUtils.ToPixels(new Position(80, 175)),
             };
             cancelButton.Clicked += (s, e) =>
             {
@@ -121,8 +122,8 @@ namespace Oobe.Wifi.Controls.Wifi
 
             okButton = new Button(ButtonStyles.OK)
             {
-                Size = new Size(240, 72),
-                Position = new Position(488, 175),
+                Size = DpUtils.ToPixels(new Size(240, 72)),
+                Position = DpUtils.ToPixels(new Position(488, 175)),
                 IsEnabled = false,
             };
             okButton.Clicked += async (s, e) =>
index 947881619d0a3ac42f9adee0038a306d8c462298..ec1a058b8632211c6f1038d048c2a2333143e6fc 100644 (file)
@@ -16,6 +16,7 @@
 
 using System;
 using Oobe.Common.Styles;
+using Oobe.Common.Utils;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;
@@ -42,7 +43,7 @@ namespace Oobe.Wifi.Controls.Wifi
                             LinearOrientation = LinearLayout.Orientation.Vertical,
                         },
                         BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "Rectangle_918.png"),
-                        Size = new Size(480, 416),
+                        Size = DpUtils.ToPixels(new Size(480, 416)),
                     };
                     view.Add(CreateHeader(480, 91));
 
@@ -78,8 +79,8 @@ namespace Oobe.Wifi.Controls.Wifi
 
             var progress = new View()
             {
-                Size = new Size(22, 23),
-                Margin = new Extents(0, 0, 1, 0),
+                Size = DpUtils.ToPixels(new Size(22, 23)),
+                Margin = DpUtils.ToPixels(new Extents(0, 0, 1, 0)),
                 BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "12_icon_scanning.png"),
             };
             view.Add(progress);
@@ -106,12 +107,12 @@ namespace Oobe.Wifi.Controls.Wifi
 
             view.Add(new TextLabel()
             {
-                Size = new Size(190, 25),
+                Size = DpUtils.ToPixels(new Size(190, 25)),
                 TranslatableText = "WIFI_SCANNING",
-                Margin = new Extents(17, 0, 0, 0),
+                Margin = DpUtils.ToPixels(new Extents(17, 0, 0, 0)),
                 VerticalAlignment = VerticalAlignment.Center,
                 HorizontalAlignment = HorizontalAlignment.Begin,
-                PixelSize = 20f,
+                PixelSize = DpUtils.ToPixels(20f),
                 TextColor = new Color(0, 0x0C / 255f, 0x2B / 255f, 1.0f),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddRegularFontStyle(),
@@ -123,9 +124,9 @@ namespace Oobe.Wifi.Controls.Wifi
         {
             return new View()
             {
-                Size2D = new Size(400, 1),
+                Size2D = DpUtils.ToPixels(new Size(400, 1)),
                 BackgroundColor = new Color(0xC3 / 255f, 0xCA / 255f, 0xD2 / 255f, 1.0f),
-                Margin = new Extents(40, 0, 0, 0),
+                Margin = DpUtils.ToPixels(new Extents(40, 0, 0, 0)),
             };
         }
 
@@ -133,14 +134,14 @@ namespace Oobe.Wifi.Controls.Wifi
         {
             var manualWifi = new View()
             {
-                Size = new Size(ListItemWidth, ListItemHeight),
+                Size = DpUtils.ToPixels(new Size(ListItemWidth, ListItemHeight)),
                 Layout = new AbsoluteLayout(),
             };
 
             var addNewButton = new Button(ButtonStyles.AddNetwork)
             {
-                Position = new Position(29, 20),
-                Size = new Size(42, 42),
+                Position = DpUtils.ToPixels(new Position(29, 20)),
+                Size = DpUtils.ToPixels(new Size(42, 42)),
             };
 
             addNewButton.Clicked += (s, e) => ShowAddNetworkPopup();
@@ -149,8 +150,8 @@ namespace Oobe.Wifi.Controls.Wifi
             manualWifi.Add(new TextLabel()
             {
                 TranslatableText = "WIFI_ADD_NEW_NETWORK",
-                Position = new Position(87, 29),
-                PixelSize = 20f,
+                Position = DpUtils.ToPixels(new Position(87, 29)),
+                PixelSize = DpUtils.ToPixels(20f),
                 TextColor = new Color(0, 0x0C / 255f, 0x2B / 255f, 1.0f),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddRegularFontStyle(),
@@ -189,7 +190,7 @@ namespace Oobe.Wifi.Controls.Wifi
         {
             var header = new View()
             {
-                Size = new Size(width, height),
+                Size = DpUtils.ToPixels(new Size(width, height)),
                 Layout = new AbsoluteLayout(),
             };
 
@@ -197,8 +198,8 @@ namespace Oobe.Wifi.Controls.Wifi
 
             var scan = new Button(ButtonStyles.Scan)
             {
-                Size = new Size(72, 32),
-                Position = new Position(276, 39),
+                Size = DpUtils.ToPixels(new Size(72, 32)),
+                Position = DpUtils.ToPixels(new Position(276, 39)),
             };
             scan.Clicked += async (s, e) =>
             {
@@ -220,8 +221,8 @@ namespace Oobe.Wifi.Controls.Wifi
         {
             var button = new Button(ButtonStyles.TurnOnOff)
             {
-                Size = new Size(72, 32),
-                Position = new Position(369, 39),
+                Size = DpUtils.ToPixels(new Size(72, 32)),
+                Position = DpUtils.ToPixels(new Position(369, 39)),
             };
             button.IsSelectable = true;
             button.IsSelected = State.IsTurnedOn;
@@ -251,8 +252,8 @@ namespace Oobe.Wifi.Controls.Wifi
 
             var prompt = new TextLabel()
             {
-                Position = new Position(40, 21),
-                PixelSize = 20,
+                Position = DpUtils.ToPixels(new Position(40, 21)),
+                PixelSize = DpUtils.ToPixels(20),
                 TextColor = new Color(0, 0x14 / 255f, 0x47 / 255f, 1.0f),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddRegularFontStyle(),
@@ -291,12 +292,12 @@ namespace Oobe.Wifi.Controls.Wifi
         {
             var view = new View()
             {
-                Position = new Position(40, 43),
+                Position = DpUtils.ToPixels(new Position(40, 43)),
             };
 
             var wifi = new TextLabel("Wi-Fi")
             {
-                PixelSize = 20f,
+                PixelSize = DpUtils.ToPixels(20f),
                 TextColor = new Color(0, 0x0C / 255f, 0x2B / 255f, 1.0f),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddRegularFontStyle(),
index e24155c2413d5117799659c83eb09a67f37f2784..646c5b4d5b588ad6101d7abc881764e88bb2f7ad 100644 (file)
@@ -9,7 +9,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="9.0.0.16249" />
+    <PackageReference Include="Tizen.NET" Version="9.0.0.16715" />
     <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
     <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
index 09e09f5612ebc15f8fa3c3ff2bab43163b0a16d1..724519bca7fab4d24624d03a7ae294c03675d9ca 100644 (file)
@@ -24,7 +24,7 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="9.0.0.16249">
+    <PackageReference Include="Tizen.NET" Version="9.0.0.16715">
       <ExcludeAssets>Runtime</ExcludeAssets>
     </PackageReference>
     <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
index dc31eb3cfeaca3955121d7b4099f343095015561..cca0be7e1b32970006edd524905fb96f7f2e325b 100644 (file)
@@ -18,6 +18,7 @@ using System;
 using System.Globalization;
 using Oobe.Common.Resources;
 using Oobe.Common.Services;
+using Oobe.Common.Utils;
 using Oobe.Managers;
 using Tizen.NUI;
 using Tizen.NUI.Components;
@@ -38,6 +39,7 @@ namespace Oobe
         {
             Tizen.Log.Debug("oobe", "OnCreate");
             base.OnCreate();
+            Tizen.Log.Debug("oobe", $"Dp->Px: {1.0f} -> {DpUtils.ToPixels(1.0f)}, Px->Dp: {1.0f} -> {DpUtils.FromPixels(1.0f)}");
             Window.Instance.Hide();
         }