From 63123b5e5b3bd10f61532e6141e1bf5b73cc3238 Mon Sep 17 00:00:00 2001 From: Jeongkyun <31116585+jkpu@users.noreply.github.com> Date: Mon, 22 Apr 2019 16:42:09 +0900 Subject: [PATCH] [CirclePage]Fix Actionbutton displaying issue on Multipage (#187) --- .../CirclePageRenderer.cs | 4 +- .../WearableUIGallery/AppViewModel.cs | 3 +- .../TC/TCIndexPageActionButton.xaml | 44 +++++++++++++++++++ .../TC/TCIndexPageActionButton.xaml.cs | 30 +++++++++++++ 4 files changed, 78 insertions(+), 3 deletions(-) mode change 100755 => 100644 src/Tizen.Wearable.CircularUI.Forms.Renderer/CirclePageRenderer.cs mode change 100755 => 100644 test/WearableUIGallery/WearableUIGallery/AppViewModel.cs create mode 100644 test/WearableUIGallery/WearableUIGallery/TC/TCIndexPageActionButton.xaml create mode 100644 test/WearableUIGallery/WearableUIGallery/TC/TCIndexPageActionButton.xaml.cs diff --git a/src/Tizen.Wearable.CircularUI.Forms.Renderer/CirclePageRenderer.cs b/src/Tizen.Wearable.CircularUI.Forms.Renderer/CirclePageRenderer.cs old mode 100755 new mode 100644 index 8cc49367..6aedd352 --- a/src/Tizen.Wearable.CircularUI.Forms.Renderer/CirclePageRenderer.cs +++ b/src/Tizen.Wearable.CircularUI.Forms.Renderer/CirclePageRenderer.cs @@ -208,7 +208,7 @@ void OnLayout() var btnRect = _actionButton.Geometry; var btnW = Math.Max(_actionButton.MinimumWidth, btnRect.Width); var btnH = Math.Max(_actionButton.MinimumHeight, btnRect.Height); - var btnX = (rect.Width - btnW) / 2; + var btnX = rect.X + (rect.Width - btnW)/2; var btnY = rect.Height - btnH; _actionButton.Geometry = new Rect(btnX, btnY, btnW, btnH); _actionButton.StackAbove(prev); @@ -221,7 +221,7 @@ void OnLayout() if (_moreOption != null) { - _moreOption.Geometry = Xamarin.Forms.Platform.Tizen.Forms.NativeParent.Geometry; + _moreOption.Geometry = rect; _moreOption.StackAbove(prev); } } diff --git a/test/WearableUIGallery/WearableUIGallery/AppViewModel.cs b/test/WearableUIGallery/WearableUIGallery/AppViewModel.cs old mode 100755 new mode 100644 index 8e5e3a8b..5e0e76a2 --- a/test/WearableUIGallery/WearableUIGallery/AppViewModel.cs +++ b/test/WearableUIGallery/WearableUIGallery/AppViewModel.cs @@ -105,7 +105,8 @@ public AppViewModel() new TCDescribe { Title = "Add/Move", Class = typeof(TCIndexPage) }, new TCDescribe { Title = "Add (base 1)", Class = typeof(TCIndexPageSingleStart) }, new TCDescribe { Title = "Template", Class = typeof(TCIndexPageTemplate) }, - new TCDescribe { Title = "Focus", Class = typeof(TCIndexPageFocus) } + new TCDescribe { Title = "Focus", Class = typeof(TCIndexPageFocus) }, + new TCDescribe { Title = "ActionButton", Class = typeof(TCIndexPageActionButton) } } }); TCs.Add(new TCDescribe diff --git a/test/WearableUIGallery/WearableUIGallery/TC/TCIndexPageActionButton.xaml b/test/WearableUIGallery/WearableUIGallery/TC/TCIndexPageActionButton.xaml new file mode 100644 index 00000000..d61d6e92 --- /dev/null +++ b/test/WearableUIGallery/WearableUIGallery/TC/TCIndexPageActionButton.xaml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/WearableUIGallery/WearableUIGallery/TC/TCIndexPageActionButton.xaml.cs b/test/WearableUIGallery/WearableUIGallery/TC/TCIndexPageActionButton.xaml.cs new file mode 100644 index 00000000..8eb02f59 --- /dev/null +++ b/test/WearableUIGallery/WearableUIGallery/TC/TCIndexPageActionButton.xaml.cs @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved + * + * 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 Tizen.Wearable.CircularUI.Forms; +using Xamarin.Forms.Xaml; + +namespace WearableUIGallery.TC +{ + [XamlCompilation(XamlCompilationOptions.Compile)] + public partial class TCIndexPageActionButton : IndexPage + { + public TCIndexPageActionButton() + { + InitializeComponent(); + } + } +} \ No newline at end of file