Skip to content

Commit

Permalink
632 bug avatar view clipping on windows (#1344)
Browse files Browse the repository at this point in the history
* Resolves issue on Windows where the splash screen icon is not found.

* Resolves an issue with the 'Ratings' sample for AvatarView.

* Spaces and not tabs

* Spaces and not tabs

* Changed MauiImage to point to Images folder.

* Changed splash for Windows to be Resize=False

* Typo in name of MauiImage

* Try to prevent locking.
  • Loading branch information
GeorgeLeithead authored Aug 17, 2023
1 parent d4a5f69 commit 649ffbc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(NetVersion)-ios;$(NetVersion)-android;$(NetVersion)-maccatalyst</TargetFrameworks>
Expand Down Expand Up @@ -42,14 +42,15 @@

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\splash.svg" BaseSize="128,128" Color="#512BD4" Resize="false" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />

<EmbeddedResource Include="Resources\Embedded\*" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<MauiFont Include="Resources\Fonts\*" />

<PackageReference Include="CommunityToolkit.Maui.Markup" Version="3.2.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
Expand Down Expand Up @@ -83,4 +84,4 @@
<RuntimeIdentifiers>maccatalyst-arm64;maccatalyst-x64</RuntimeIdentifiers>
</PropertyGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
</Setter>
<Setter Property="FontSize" Value="Default" />
<Setter Property="TextColor" Value="Silver" />
<Setter Property="WidthRequest" Value="48" />
<Setter Property="HeightRequest" Value="48" />
</Style>
</ResourceDictionary>
</VerticalStackLayout.Resources>
Expand All @@ -66,39 +64,39 @@
Grid.Column="0"
HeightRequest="48"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="1"
WidthRequest="48" />
<mct:AvatarView
Grid.Column="1"
HeightRequest="48"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="2"
WidthRequest="48" />
<mct:AvatarView
Grid.Column="2"
HeightRequest="48"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="3"
WidthRequest="48" />
<mct:AvatarView
Grid.Column="3"
HeightRequest="48"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="4"
WidthRequest="48" />
<mct:AvatarView
Grid.Column="4"
HeightRequest="48"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star, cliped by parent size."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="5"
WidthRequest="48">
Expand All @@ -112,7 +110,7 @@
HeightRequest="48"
ImageSource="avatar_icon.png"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="1"
WidthRequest="48" />
Expand All @@ -122,7 +120,7 @@
HeightRequest="48"
ImageSource="https://aka.ms/campus.jpg"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="2"
WidthRequest="48" />
Expand All @@ -132,7 +130,7 @@
HeightRequest="48"
ImageSource="avatar_icon.png"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star, cliped by parent size."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="3"
WidthRequest="48">
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 649ffbc

Please sign in to comment.