diff options
author | Hyerim Kim <rimi.kim@samsung.com> | 2017-04-27 16:30:13 +0900 |
---|---|---|
committer | ChulSeung Kim <charles0.kim@samsung.com> | 2017-06-08 18:34:53 +0900 |
commit | 0422a37c4e25ceadd92ce31cd458606a4460af73 (patch) | |
tree | 2f258d8435b0aa7e69852b208d7876dc680a4ce8 /TVHome | |
parent | e482c9f0fb9da6236bf6c2a373807868f75d183b (diff) | |
download | home-0422a37c4e25ceadd92ce31cd458606a4460af73.tar.gz home-0422a37c4e25ceadd92ce31cd458606a4460af73.tar.bz2 home-0422a37c4e25ceadd92ce31cd458606a4460af73.zip |
Adjust font weight & font family
Removes unused files
Change-Id: I23dea2f84c84c04e0b368b60907a52ab29e33081
Signed-off-by: Hyerim Kim <rimi.kim@samsung.com>
Diffstat (limited to 'TVHome')
-rwxr-xr-x | TVHome/TVHome/Controls/SubPanelReservedButton.xaml | 41 | ||||
-rwxr-xr-x | TVHome/TVHome/Controls/SubPanelReservedButton.xaml.cs | 133 | ||||
-rwxr-xr-x | TVHome/TVHome/TVHome.csproj | 3 | ||||
-rwxr-xr-x | TVHome/TVHome/Views/SubPanel.xaml.cs | 8 | ||||
-rwxr-xr-x | TVHome/TVHome/Views/SubThumbnailPanel.xaml | 3 | ||||
-rwxr-xr-x | TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs | 3 |
6 files changed, 7 insertions, 184 deletions
diff --git a/TVHome/TVHome/Controls/SubPanelReservedButton.xaml b/TVHome/TVHome/Controls/SubPanelReservedButton.xaml deleted file mode 100755 index da458dd..0000000 --- a/TVHome/TVHome/Controls/SubPanelReservedButton.xaml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Controls:PanelButton xmlns="http://xamarin.com/schemas/2014/forms" - xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" - xmlns:Controls="clr-namespace:TVHome.Controls" - x:Class="TVHome.Controls.SubPanelReservedButton"> - <RelativeLayout x:Name = "ButtonBox" - HorizontalOptions="Center"> - <Image x:Name="ButtonImage" - RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}" - RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}" - RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.6}" - RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75824}" - Source="{Binding CurrentStateDescription.IconPath}" /> - <Image x:Name="ButtonDimmedImage" - RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}" - RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}" - RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.6}" - RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75824}" - Source="img_home_list_dimmed_apps_75.png" /> - <Label x:Name="ButtonTitle" - RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}" - RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.77391}" - RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.1303478}" - RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.758241}" - Opacity="0.6" - TextColor="White" - FontFamily="BreezeSans" - LineBreakMode="TailTruncation" - HorizontalTextAlignment="Center" - Text="{Binding CurrentStateDescription.Label}" /> - <Button x:Name = "ButtonFocusArea" - RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0}" - RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0}" - RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}" - RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}" - Focused="OnFocused" - Unfocused="OnUnfocused" - Clicked="OnClicked" - Opacity="0" /> - </RelativeLayout> -</Controls:PanelButton>
\ No newline at end of file diff --git a/TVHome/TVHome/Controls/SubPanelReservedButton.xaml.cs b/TVHome/TVHome/Controls/SubPanelReservedButton.xaml.cs deleted file mode 100755 index 89e44a1..0000000 --- a/TVHome/TVHome/Controls/SubPanelReservedButton.xaml.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 2017 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.1 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://floralicense.org/license/ - * - * 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.Windows.Input; -using LibTVRefCommonPortable.Utils; -using Xamarin.Forms; -using Xamarin.Forms.PlatformConfiguration.TizenSpecific; - -namespace TVHome.Controls -{ - /// <summary> - /// Custom Control for Button in Sub Panel - /// </summary> - public partial class SubPanelReservedButton : PanelButton - { - /// <summary> - /// SubPanel icon's transition height value when it focused. - /// </summary> - private int selectTransitionHeight = SizeUtils.GetHeightSize(22); - - /// <summary> - /// Constructor - /// </summary> - public SubPanelReservedButton() - { - InitializeComponent(); - - ButtonBox.WidthRequest = SizeUtils.GetWidthSize(182); - ButtonBox.HeightRequest = SizeUtils.GetHeightSize(230); - ButtonTitle.FontSize = SizeUtils.GetFontSize(26); - ButtonTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal); - } - - /// <summary> - /// Handles Button Clicked event - /// </summary> - /// <param name="sender">The source of the event</param> - /// <param name="e">The event that is occurred when button is clicked</param> - public override async void OnClicked(object sender, EventArgs e) - { - if (OnClickedCommand != null) - { - OnClickedCommand.Execute(""); - } - - await View.FadeTo(0.99, 300); - } - - /// <summary> - /// Handles Button Focused event - /// </summary> - /// <param name="sender">The source of the event</param> - /// <param name="e">The event that is occurred when button is focused</param> - public override async void OnFocused(object sender, FocusEventArgs e) - { - if (OnFocusedCommand != null) - { - OnFocusedCommand.Execute(""); - } - -#pragma warning disable CS4014 - ButtonTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Medium); - ButtonTitle.FadeTo(0.99, 300); - ButtonTitle.TranslateTo(0, selectTransitionHeight, 300); -#pragma warning restore CS4014 - await ButtonImage.ScaleTo(1.3, 300); - } - - /// <summary> - /// Handles Button Unfocused event - /// </summary> - /// <param name="sender">The source of the event</param> - /// <param name="e">The event that is occurred when button is unfocused</param> - public override async void OnUnfocused(object sender, FocusEventArgs e) - { -#pragma warning disable CS4014 - ButtonTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal); - ButtonTitle.FadeTo(0.5, 300); - ButtonTitle.TranslateTo(0, 0, 300); -#pragma warning restore CS4014 - await ButtonImage.ScaleTo(1, 300); - } - - /// <summary> - /// A method for handling the button when button is changed to move mode - /// </summary> - /// <param name="isMoveMode">A flag indicates whether the button is move mode or not</param> - /// <param name="isDefault">A flag indicates whether this method is called by ChangeToDefaultMode method</param> - public override void ChangeMoveMode(bool isMoveMode, bool isDefault) - { - - } - - /// <summary> - /// A method for changing the button's LayoutOptions according to parameter - /// </summary> - /// <param name="isMoveMode">A flag indicates whether the SubPanel is MoveMode or not</param> - public override void ChangeLayoutOptions(bool isMoveMode) - { - if (isMoveMode) - { - View.VerticalOptions = LayoutOptions.End; - } - else - { - View.VerticalOptions = LayoutOptions.Start; - } - - View.TranslateTo(0, 0, 0); - } - - /// <summary> - /// A method for showing Context popup - /// </summary> - public override void ShowContextPopup() - { - } - } -}
\ No newline at end of file diff --git a/TVHome/TVHome/TVHome.csproj b/TVHome/TVHome/TVHome.csproj index 740f91c..9897814 100755 --- a/TVHome/TVHome/TVHome.csproj +++ b/TVHome/TVHome/TVHome.csproj @@ -44,9 +44,6 @@ <Compile Include="Controls\SubPanelAllAppsButton.xaml.cs"> <DependentUpon>SubPanelAllAppsButton.xaml</DependentUpon> </Compile> - <Compile Include="Controls\SubPanelReservedButton.xaml.cs"> - <DependentUpon>SubPanelReservedButton.xaml</DependentUpon> - </Compile> <Compile Include="Controls\SubPanelButton.xaml.cs"> <DependentUpon>SubPanelButton.xaml</DependentUpon> </Compile> diff --git a/TVHome/TVHome/Views/SubPanel.xaml.cs b/TVHome/TVHome/Views/SubPanel.xaml.cs index 70fc6b4..5b993a5 100755 --- a/TVHome/TVHome/Views/SubPanel.xaml.cs +++ b/TVHome/TVHome/Views/SubPanel.xaml.cs @@ -105,16 +105,12 @@ namespace TVHome.Views if (item is AppShortcutInfo) { if (item.StateDescriptions["default"].Label.Equals("All apps") - || item.StateDescriptions["default"].Label.Equals("Add pin")) + || item.StateDescriptions["default"].Label.Equals("Add pin") + || item.StateDescriptions["default"].Label.Equals("Media Hub")) { button = new SubPanelAllAppsButton(); ButtonList.Add(button); } - else if (item.StateDescriptions["default"].Label.Equals("Media Hub")) - { - button = new SubPanelReservedButton(); - ButtonList.Add(button); - } else { button = new SubPanelButton(); diff --git a/TVHome/TVHome/Views/SubThumbnailPanel.xaml b/TVHome/TVHome/Views/SubThumbnailPanel.xaml index 50699cf..df989e3 100755 --- a/TVHome/TVHome/Views/SubThumbnailPanel.xaml +++ b/TVHome/TVHome/Views/SubThumbnailPanel.xaml @@ -34,7 +34,7 @@ BorderBottom="2" BorderLeft="2" BorderRight="2"/> - <Label x:Name="Text" + <Label x:Name="NoContentInfoText" RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=NoContentInfo ,Property=Height, Factor=0.3}" RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=NoContentInfo ,Property=Width, Factor=0.354167}" RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=NoContentInfo ,Property=Height, Factor=0.181818}" @@ -42,6 +42,7 @@ HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Text="No Content to display" + FontFamily="BreezeSans" FontSize="{Binding NoContentInformationFontSize}" TextColor="White" /> </RelativeLayout> diff --git a/TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs b/TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs index e4264af..1be9477 100755 --- a/TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs +++ b/TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs @@ -22,9 +22,11 @@ using System.Threading.Tasks; using Tizen.Xamarin.Forms.Extension; using LibTVRefCommonPortable.Utils; using System.Collections.Generic; +using Xamarin.Forms.PlatformConfiguration.TizenSpecific; namespace TVHome.Views { + using Tizen = Xamarin.Forms.PlatformConfiguration.Tizen; /// <summary> /// SubThumnailPanel in Main Page for Recent /// </summary> @@ -62,6 +64,7 @@ namespace TVHome.Views InitializeComponent(); isFocused = false; PropertyChanged += OnItemsSourcePropertyChanged; + NoContentInfoText.On<Tizen>().SetFontWeight(FontWeight.Light); ButtonList = new List<PanelButton>(); |