Skip to content

Commit

Permalink
Update Maui to the later P14 (#1967)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow authored Mar 4, 2022
1 parent 5f8ae3e commit ccc64cd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">

<Identity
Name="69157F47-E4B3-4267-82FE-04460C520A8F"
Publisher="CN=User Name"
Version="1.0.0.0" />
<Identity Publisher="CN=User Name" />

<Properties>
<DisplayName>SkiaSharpSample</DisplayName>
<PublisherDisplayName>Microsoft</PublisherDisplayName>
<Logo>Assets\appiconStoreLogo.png</Logo>
</Properties>

<Dependencies>
Expand All @@ -27,28 +22,7 @@
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="SkiaSharpSample"
Description="SkiaSharpSample"
BackgroundColor="transparent"
Square150x150Logo="Assets\appiconMediumTile.png"
Square44x44Logo="Assets\appiconLogo.png">
<uap:DefaultTile
Wide310x150Logo="Assets\appiconWideTile.png"
Square71x71Logo="Assets\appiconSmallTile.png"
Square310x310Logo="Assets\appiconLargeTile.png"
ShortName="SkiaSharpSample">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo"/>
<uap:ShowOn Tile="wide310x150Logo"/>
</uap:ShowNameOnTiles>
</uap:DefaultTile >
<uap:SplashScreen Image="Assets\skiasharplogoSplashScreen.png" />
</uap:VisualElements>
</Application>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$" />
</Applications>

<Capabilities>
Expand Down
5 changes: 3 additions & 2 deletions samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
<RootNamespace>SkiaSharpSample</RootNamespace>
<ApplicationTitle>SkiaSharpSample</ApplicationTitle>
<ApplicationId>com.companyname.SkiaSharpSample</ApplicationId>
<ApplicationId Condition="$(TargetFramework.Contains('-windows'))">69157F47-E4B3-4267-82FE-04460C520A8F</ApplicationId>
<ApplicationVersion>1</ApplicationVersion>
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<LangVersion>9.0</LangVersion>
<LangVersion>10.0</LangVersion>
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">14.0</SupportedOSPlatformVersion>
Expand All @@ -21,7 +22,7 @@
</PropertyGroup>

<ItemGroup>
<MauiImage Include="Resources\appicon.png" IsAppIcon="true" Color="#F8F8F8" />
<MauiIcon Include="Resources\appicon.png" IsAppIcon="true" Color="#F8F8F8" />
<MauiSplashScreen Include="Resources\skiasharplogo.png" BaseSize="256" Color="#F8F8F8" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions source/SkiaSharp.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<BuildingForNet6 Condition="'$(BuildingForNet6)' == ''">false</BuildingForNet6>
<MDocDocumentationDirectory>$(MSBuildThisFileDirectory)..\docs\SkiaSharpAPI</MDocDocumentationDirectory>
<LangVersion>9.0</LangVersion>
<LangVersion Condition="$(IsWindows)">10.0</LangVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,22 @@ public static SKSize ToSKSize(this SizeF size) =>

// Rect

public static Rectangle ToMauiRectangle(this SKRectI rect) =>
new Rectangle(rect.Left, rect.Top, rect.Width, rect.Height);
public static Rect ToMauiRectangle(this SKRectI rect) =>
new Rect(rect.Left, rect.Top, rect.Width, rect.Height);

public static RectangleF ToMauiRectangleF(this SKRectI rect) =>
new RectangleF(rect.Left, rect.Top, rect.Width, rect.Height);
public static RectF ToMauiRectangleF(this SKRectI rect) =>
new RectF(rect.Left, rect.Top, rect.Width, rect.Height);

public static Rectangle ToMauiRectangle(this SKRect rect) =>
new Rectangle(rect.Left, rect.Top, rect.Width, rect.Height);
public static Rect ToMauiRectangle(this SKRect rect) =>
new Rect(rect.Left, rect.Top, rect.Width, rect.Height);

public static RectangleF ToMauiRectangleF(this SKRect rect) =>
new RectangleF(rect.Left, rect.Top, rect.Width, rect.Height);
public static RectF ToMauiRectangleF(this SKRect rect) =>
new RectF(rect.Left, rect.Top, rect.Width, rect.Height);

public static SKRect ToSKRect(this Rectangle rect) =>
public static SKRect ToSKRect(this Rect rect) =>
new SKRect((float)rect.Left, (float)rect.Top, (float)rect.Right, (float)rect.Bottom);

public static SKRect ToSKRect(this RectangleF rect) =>
public static SKRect ToSKRect(this RectF rect) =>
new SKRect(rect.Left, rect.Top, rect.Right, rect.Bottom);

// Color
Expand Down

0 comments on commit ccc64cd

Please sign in to comment.