From: Hyerim Kim Date: Wed, 10 May 2017 09:47:53 +0000 (+0900) Subject: Exchanges menu key handling from MessageCenter to EventHandler X-Git-Tag: submit/tizen/20170808.015446~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09fa8bc4eafbe9c2f3311f725f0eb14d4d3aa537;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Exchanges menu key handling from MessageCenter to EventHandler Fixed a bug on scaling dimmed backgound image of SubPanelAllAppsButton / SettingSubPanelButton Scrolling when recent list item is focused Changes sort comparer to descending of recent list Change-Id: If1419f57946a46266c93f02023acb6798d5fc06c Signed-off-by: Hyerim Kim --- diff --git a/LibTVRefCommonPortable/DataModels/RecentShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/RecentShortcutInfo.cs index 05a0180..3d853ef 100755 --- a/LibTVRefCommonPortable/DataModels/RecentShortcutInfo.cs +++ b/LibTVRefCommonPortable/DataModels/RecentShortcutInfo.cs @@ -63,7 +63,7 @@ namespace LibTVRefCommonPortable.DataModels int IComparable.CompareTo(object target) { var rightShortcutInfo = target as RecentShortcutInfo; - return Date.CompareTo(rightShortcutInfo.Date); + return Date.CompareTo(rightShortcutInfo.Date) * -1; } } } diff --git a/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs b/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs index 5beba18..7a51c49 100755 --- a/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs +++ b/TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs @@ -77,6 +77,7 @@ namespace TVHome.Controls ButtonTitle.TranslateTo(0, selectTransitionHeight, 300); #pragma warning restore CS4014 await ButtonImage.ScaleTo(1.3, 300); + ButtonDimmedImage.Scale = 1.3; } /// @@ -92,6 +93,7 @@ namespace TVHome.Controls ButtonTitle.TranslateTo(0, 0, 300); #pragma warning restore CS4014 await ButtonImage.ScaleTo(1.0, 300); + ButtonDimmedImage.Scale = 1.0; } /// diff --git a/TVHome/TVHome/Controls/SubPanelSettingButton.xaml.cs b/TVHome/TVHome/Controls/SubPanelSettingButton.xaml.cs index 0969367..83eb814 100755 --- a/TVHome/TVHome/Controls/SubPanelSettingButton.xaml.cs +++ b/TVHome/TVHome/Controls/SubPanelSettingButton.xaml.cs @@ -77,6 +77,7 @@ namespace TVHome.Controls ButtonTitle.TranslateTo(0, selectTransitionHeight, 300); #pragma warning restore CS4014 await ButtonImage.ScaleTo(1.3, 300); + ButtonDimmedImage.Scale = 1.3; } /// @@ -92,6 +93,7 @@ namespace TVHome.Controls ButtonTitle.TranslateTo(0, 0, 300); #pragma warning restore CS4014 await ButtonImage.ScaleTo(1, 300); + ButtonDimmedImage.Scale = 1; } /// diff --git a/TVHome/TVHome/TVHome.cs b/TVHome/TVHome/TVHome.cs index e614b25..213a24a 100755 --- a/TVHome/TVHome/TVHome.cs +++ b/TVHome/TVHome/TVHome.cs @@ -192,11 +192,10 @@ namespace TVHome public void OnMenuKeyPressed() { DebuggingUtils.Dbg("\" Menu Key \" "); - /* MenuKeyListener.Invoke(this, new TVHomeEventArgs() - { - arg = "", - });*/ - MessagingCenter.Send(this, "MenuKeyPressed"); + MenuKeyListener.Invoke(this, new TVHomeEventArgs() + { + arg = "", + }); } public void OnNavigationKeyPressed(string keyName) diff --git a/TVHome/TVHome/ViewModels/MainPageViewModel.cs b/TVHome/TVHome/ViewModels/MainPageViewModel.cs index eff83cc..e6a5955 100755 --- a/TVHome/TVHome/ViewModels/MainPageViewModel.cs +++ b/TVHome/TVHome/ViewModels/MainPageViewModel.cs @@ -164,7 +164,7 @@ namespace TVHome.ViewModels { get { - return new Thickness(SizeUtils.GetHeightSize(223), SizeUtils.GetWidthSize(32)); + return new Thickness(SizeUtils.GetWidthSize(96), SizeUtils.GetWidthSize(32)); } } diff --git a/TVHome/TVHome/Views/MainPage.xaml.cs b/TVHome/TVHome/Views/MainPage.xaml.cs index 4175824..f95992e 100755 --- a/TVHome/TVHome/Views/MainPage.xaml.cs +++ b/TVHome/TVHome/Views/MainPage.xaml.cs @@ -134,6 +134,18 @@ namespace TVHome.Views ToggleIconified(); }); + App.SetMenuKeyListener((e, arg) => + { + if (AppsSubPanel.isFocused) + { + AppsSubPanel.MenuKeyPressed(); + } + else if (RecentSubPanel.isFocused) + { + RecentSubPanel.MenuKeyPressed(); + } + }); + AppsSubPanel.OnShowOptionsCommand = new Command((isShowOptions) => { var bounds = AppsSubPanel.Bounds; diff --git a/TVHome/TVHome/Views/MainPanel.xaml.cs b/TVHome/TVHome/Views/MainPanel.xaml.cs index 254187e..79b4687 100755 --- a/TVHome/TVHome/Views/MainPanel.xaml.cs +++ b/TVHome/TVHome/Views/MainPanel.xaml.cs @@ -138,5 +138,10 @@ namespace TVHome.Views var button = PanelButtonGrid.Children[idx]; button.FindByName