From e65b134c307a33efb7aba66ae80aff3cea42f756 Mon Sep 17 00:00:00 2001 From: "Krzysztof Wieclaw/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics" Date: Thu, 9 Apr 2020 17:22:50 +0200 Subject: [PATCH] Fix fonts issues --- Oobe/OobeWifi/Controls/SequenceLinearLayout.cs | 1 - Oobe/OobeWifi/Controls/Wifi/AddNewNetworkPupup.cs | 16 ++++++++++------ .../Controls/Wifi/ChangeSecurityTypePopup.cs | 2 +- Oobe/OobeWifi/Controls/Wifi/SecurityTypeView.cs | 22 +++++++++++++++------- .../OobeWifi/Controls/Wifi/Translations.pl-PL.resx | 4 ++-- Oobe/OobeWifi/Controls/Wifi/Translations.resx | 4 ++-- 6 files changed, 30 insertions(+), 19 deletions(-) diff --git a/Oobe/OobeWifi/Controls/SequenceLinearLayout.cs b/Oobe/OobeWifi/Controls/SequenceLinearLayout.cs index 5400925..44ea308 100644 --- a/Oobe/OobeWifi/Controls/SequenceLinearLayout.cs +++ b/Oobe/OobeWifi/Controls/SequenceLinearLayout.cs @@ -16,7 +16,6 @@ namespace Oobe.Wifi.Controls { LayoutChildren.Add(item); RequestLayout(); - } } } diff --git a/Oobe/OobeWifi/Controls/Wifi/AddNewNetworkPupup.cs b/Oobe/OobeWifi/Controls/Wifi/AddNewNetworkPupup.cs index 9b2efb8..a19627a 100644 --- a/Oobe/OobeWifi/Controls/Wifi/AddNewNetworkPupup.cs +++ b/Oobe/OobeWifi/Controls/Wifi/AddNewNetworkPupup.cs @@ -9,7 +9,6 @@ using Tizen.NUI.Components; using Oobe.Common.Styles; using Tizen.Network.WiFi; using Oobe.Common.Utils; -using OobeWifi.Controls.Wifi; namespace Oobe.Wifi.Controls.Wifi { @@ -78,7 +77,7 @@ namespace Oobe.Wifi.Controls.Wifi TextField CreateTextField(string placeholderTranslatableText, Position2D position = null) { position ??= new Position2D(); - return new TextField + var textField = new TextField { Position = position, Size = textControlSize, @@ -90,6 +89,7 @@ namespace Oobe.Wifi.Controls.Wifi HorizontalAlignment = HorizontalAlignment.Begin, VerticalAlignment = VerticalAlignment.Center }; + return textField; } View CreateUnderline(Position2D position = null) @@ -106,7 +106,7 @@ namespace Oobe.Wifi.Controls.Wifi PasswordEntry CreatePasswordEntry(Position2D position = null) { position ??= new Position2D(); - return new PasswordEntry + var passwordEntry = new PasswordEntry { Position = position, Size = textControlSize, @@ -119,6 +119,7 @@ namespace Oobe.Wifi.Controls.Wifi VerticalAlignment = VerticalAlignment.Center, Revealed = false }; + return passwordEntry; } Button CreateRevealButton(Position2D position = null) @@ -168,13 +169,15 @@ namespace Oobe.Wifi.Controls.Wifi securityTypeButton = new Button { - Size = textControlSize, + Size = new Size(583, 30), Position2D = new Position2D(121, 161), + PointSize = 22, Text = currentSecurityType.GetUIName(), BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f), - TextAlignment = HorizontalAlignment.Begin + TextAlignment = HorizontalAlignment.Begin, + CellHorizontalAlignment = HorizontalAlignmentType.Center, + CellVerticalAlignment = VerticalAlignmentType.Center }; - securityTypeButton.ClickEvent += (s, e) => OpenSecurityTypePopup(); this.Add(securityTypeButton); @@ -480,6 +483,7 @@ namespace Oobe.Wifi.Controls.Wifi void ResetViewTo(WifiUISecurityType securityType) { + Tizen.Log.Debug("oobe", $"Reseting view to {securityType.GetUIName()}"); failureLabel.Hide(); currentSecurityType = securityType; securityTypeButton.TranslatableText = securityType.GetUIName(); diff --git a/Oobe/OobeWifi/Controls/Wifi/ChangeSecurityTypePopup.cs b/Oobe/OobeWifi/Controls/Wifi/ChangeSecurityTypePopup.cs index 78b0cfa..e9679be 100644 --- a/Oobe/OobeWifi/Controls/Wifi/ChangeSecurityTypePopup.cs +++ b/Oobe/OobeWifi/Controls/Wifi/ChangeSecurityTypePopup.cs @@ -53,7 +53,7 @@ namespace Oobe.Wifi.Controls.Wifi var cancelButton = new Button(ButtonStyles.Cancel) { Position = new Position(80, 344), - Size = new Size(240, 72) + Size = new Size(240, 72), }; cancelButton.ClickEvent += (s, e) => { diff --git a/Oobe/OobeWifi/Controls/Wifi/SecurityTypeView.cs b/Oobe/OobeWifi/Controls/Wifi/SecurityTypeView.cs index a284676..c6c65de 100644 --- a/Oobe/OobeWifi/Controls/Wifi/SecurityTypeView.cs +++ b/Oobe/OobeWifi/Controls/Wifi/SecurityTypeView.cs @@ -2,8 +2,8 @@ using Tizen.Network.WiFi; using Tizen.NUI; using Tizen.NUI.BaseComponents; -using Oobe.Common.Styles; using Tizen.NUI.Components; +using Oobe.Common.Styles; namespace Oobe.Wifi.Controls.Wifi { @@ -28,19 +28,27 @@ namespace Oobe.Wifi.Controls.Wifi void InitializeSubelements() { - Button = new RadioButton() + Button = new RadioButton { IsSelected = false, Position = new Position(40, 20), - Size = new Size(24, 24) + Size = new Size(24, 24), + CellHorizontalAlignment = HorizontalAlignmentType.Center, + CellVerticalAlignment = VerticalAlignmentType.Center }; this.Add(Button); - descriptionTextLabel = new TextLabel() + descriptionTextLabel = new TextLabel { - Position = new Position(92, 20), - Size = new Size(648, 24), - TranslatableText = WifiUISecurityType.GetUIName() + Position = new Position(92, 19), + Size = new Size(648, 26), + PixelSize = 20, + TranslatableText = WifiUISecurityType.GetUIName(), + FontFamily = "BreezeSans", + FontStyle = new PropertyMap().AddLightFontStyle(), + TextColor = new Color(0.0f, 0x14 / 255.0f, 0x47 / 255.0f, 1.0f), + HorizontalAlignment = HorizontalAlignment.Begin, + VerticalAlignment = VerticalAlignment.Center }; this.Add(descriptionTextLabel); } diff --git a/Oobe/OobeWifi/Controls/Wifi/Translations.pl-PL.resx b/Oobe/OobeWifi/Controls/Wifi/Translations.pl-PL.resx index d4bafc4..ec8c4f9 100644 --- a/Oobe/OobeWifi/Controls/Wifi/Translations.pl-PL.resx +++ b/Oobe/OobeWifi/Controls/Wifi/Translations.pl-PL.resx @@ -181,9 +181,9 @@ WEP - WPAPSK + WPA PSK - WPA2PSK + WPA2 PSK \ No newline at end of file diff --git a/Oobe/OobeWifi/Controls/Wifi/Translations.resx b/Oobe/OobeWifi/Controls/Wifi/Translations.resx index 8df661a..64da83f 100644 --- a/Oobe/OobeWifi/Controls/Wifi/Translations.resx +++ b/Oobe/OobeWifi/Controls/Wifi/Translations.resx @@ -181,9 +181,9 @@ WEP - WPAPSK + WPA PSK - WPA2PSK + WPA2 PSK \ No newline at end of file -- 2.7.4