From c6309173ba1202980d75f750807c579362488087 Mon Sep 17 00:00:00 2001 From: Dinis Vieira Date: Sat, 4 Nov 2023 17:48:59 +0000 Subject: [PATCH] PM-3349 PM-3350 Migrated IconLabelButton Frames to Borders to fix issue with TapGestureRecognizer in Android Also fixed some minor "styles" for normal Button and IconLabelButton (both Android and iOS) --- .../IconLabelButton/IconLabelButton.xaml | 67 +++++++++---------- .../IconLabelButton/IconLabelButton.xaml.cs | 23 +++---- src/Core/Pages/Accounts/LoginPage.xaml | 2 +- src/Core/Resources/Styles/iOS.xaml | 4 ++ 4 files changed, 47 insertions(+), 49 deletions(-) diff --git a/src/Core/Controls/IconLabelButton/IconLabelButton.xaml b/src/Core/Controls/IconLabelButton/IconLabelButton.xaml index bb3ce642a..18d89eb64 100644 --- a/src/Core/Controls/IconLabelButton/IconLabelButton.xaml +++ b/src/Core/Controls/IconLabelButton/IconLabelButton.xaml @@ -1,42 +1,37 @@ - - - - - - - - - - - + StyleClass="btn-icon-secondary"> + + + + + + + + + + + + + + + diff --git a/src/Core/Controls/IconLabelButton/IconLabelButton.xaml.cs b/src/Core/Controls/IconLabelButton/IconLabelButton.xaml.cs index 1fb63785f..23b306682 100644 --- a/src/Core/Controls/IconLabelButton/IconLabelButton.xaml.cs +++ b/src/Core/Controls/IconLabelButton/IconLabelButton.xaml.cs @@ -1,18 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Input; -using Bit.Core.Models.Domain; -using Microsoft.Maui.Controls.Xaml; -using Microsoft.Maui.Graphics; -using Microsoft.Maui.Controls; -using Microsoft.Maui; +using System.Windows.Input; namespace Bit.App.Controls { - public partial class IconLabelButton : Frame + public partial class IconLabelButton : ContentView { public static readonly BindableProperty IconProperty = BindableProperty.Create( nameof(Icon), typeof(string), typeof(IconLabelButton)); @@ -32,6 +22,9 @@ namespace Bit.App.Controls public static readonly BindableProperty IconLabelBorderColorProperty = BindableProperty.Create( nameof(IconLabelBorderColor), typeof(Color), typeof(IconLabelButton), Colors.White); + public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create( + nameof(CornerRadius), typeof(CornerRadius), typeof(IconLabelButton)); + public IconLabelButton() { InitializeComponent(); @@ -72,6 +65,12 @@ namespace Bit.App.Controls get { return (Color)GetValue(IconLabelBorderColorProperty); } set { SetValue(IconLabelBorderColorProperty, value); } } + + public CornerRadius CornerRadius + { + get { return (CornerRadius)GetValue(CornerRadiusProperty); } + set { SetValue(CornerRadiusProperty, value); } + } } } diff --git a/src/Core/Pages/Accounts/LoginPage.xaml b/src/Core/Pages/Accounts/LoginPage.xaml index c0a59db49..2e500d5fa 100644 --- a/src/Core/Pages/Accounts/LoginPage.xaml +++ b/src/Core/Pages/Accounts/LoginPage.xaml @@ -107,7 +107,7 @@ - +