Skip to content

Commit

Permalink
Merge branch 'rel-1.1' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
enisn committed Nov 10, 2022
2 parents d2cb86c + a9336b9 commit 9e26d8e
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 8 deletions.
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>1.0.2</Version>
<Version>1.1.0</Version>
<PackageIcon>logo_128.png</PackageIcon>
<NeutralLanguage>en</NeutralLanguage>
<RepositoryUrl>https://github.com/enisn/UraniumUI</RepositoryUrl>
Expand Down
1 change: 1 addition & 0 deletions docs/en/migration-guides/Migrating-To-1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Each input has a disabled state now. It's working well after updating to v1.1. B
<VisualState.Setters>
<Setter Property="Opacity" Value="1"/>
<Setter Property="AccentColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource PrimaryDark}}" />
<Setter Property="BorderColor" Value="{AppThemeBinding Light={StaticResource OnBackground}, Dark={StaticResource OnBackgroundDark}}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
Expand Down
25 changes: 23 additions & 2 deletions src/UraniumUI.Material/Controls/InputField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ public InputField()

InitializeValidation();
}
~InputField()
{
ReleaseEvents();
}

protected override async void OnSizeAllocated(double width, double height)
{
Expand All @@ -108,7 +112,18 @@ protected override async void OnSizeAllocated(double width, double height)
InitializeBorder();
}

private void InitializeBorder()
// TODO: Remove this member hiding after android unfocus fixed.
public new void Unfocus()
{
base.Unfocus();
#if ANDROID
var view = Content.Handler.PlatformView as Android.Views.View;

view?.ClearFocus();
#endif
}

private void InitializeBorder()
{
var perimeter = (this.Width + this.Height) * 2;

Expand Down Expand Up @@ -199,7 +214,13 @@ protected virtual void RegisterForEvents()
}
}

private void Content_Unfocused(object sender, FocusEventArgs e)
protected virtual void ReleaseEvents()
{
Content.Focused -= Content_Focused;
Content.Unfocused -= Content_Unfocused;
}

private void Content_Unfocused(object sender, FocusEventArgs e)
{
border.Stroke = BorderColor;
labelTitle.TextColor = TitleColor;
Expand Down
7 changes: 6 additions & 1 deletion src/UraniumUI.Material/Controls/TextField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ public TextField()
#endif
}

public void Clear()
~TextField()
{
EntryView.TextChanged -= EntryView_TextChanged;
}

public void ClearValue()
{
if (IsEnabled)
{
Expand Down
1 change: 1 addition & 0 deletions src/UraniumUI.Material/Resources/StyleResource.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@
<VisualState.Setters>
<Setter Property="Opacity" Value="1"/>
<Setter Property="AccentColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource PrimaryDark}}" />
<Setter Property="BorderColor" Value="{AppThemeBinding Light={StaticResource OnBackground}, Dark={StaticResource OnBackgroundDark}}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
Expand Down
2 changes: 1 addition & 1 deletion templates/UraniumUI.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PackageType>Template</PackageType>
<PackageVersion>1.0.2</PackageVersion>
<PackageVersion>1.1.0</PackageVersion>
<Title>Uranium UI MAUI Templates</Title>
<Authors>enisn</Authors>
<Description>Templates for new MAUI Apps, Themes and Libraries</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="UraniumUI.Material" Version="1.0.2" />
<PackageReference Include="UraniumUI.Material" Version="1.1.0" />
<!--#if (FontAwesome)-->
<PackageReference Include="UraniumUI.Icons.FontAwesome" Version="1.0.2" />
<PackageReference Include="UraniumUI.Icons.FontAwesome" Version="1.1.0" />
<!--#endif-->
<!--#if (MaterialIcons)-->
<PackageReference Include="UraniumUI.Icons.MaterialIcons" Version="1.0.2" />
<PackageReference Include="UraniumUI.Icons.MaterialIcons" Version="1.1.0" />
<!--#endif-->
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
<VisualState.Setters>
<Setter Property="Opacity" Value="1"/>
<Setter Property="AccentColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource PrimaryDark}}" />
<Setter Property="BorderColor" Value="{AppThemeBinding Light={StaticResource OnBackground}, Dark={StaticResource OnBackgroundDark}}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
Expand Down

0 comments on commit 9e26d8e

Please sign in to comment.