Skip to content

Commit

Permalink
Merge pull request #10 from softlion/main
Browse files Browse the repository at this point in the history
add a test for NeoFrame. Correctly ref maui nugets. remove obsolete AndExpand.
  • Loading branch information
felipebaltazar authored Nov 1, 2024
2 parents d431934 + 68c7972 commit e17e90b
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 51 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ bld/

# Visual Studio 2015/2017 cache/options directory
.vs/
.idea/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

Expand Down
83 changes: 38 additions & 45 deletions Maui.NeoControls.Demo/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,36 @@
Shell.PresentationMode="Modal"
NavigationPage.HasNavigationBar="False">

<Grid HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
<Grid HorizontalOptions="Fill" VerticalOptions="Fill"
ColumnSpacing="12"
Padding="35">

<Grid.RowDefinitions>
<RowDefinition Height="10*"/>
<RowDefinition Height="27*"/>
<RowDefinition Height="27*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="15*"/>
<RowDefinition Height="12*"/>
</Grid.RowDefinitions>

<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="50*" />
</Grid.ColumnDefinitions>

<StackLayout Orientation="Vertical" Spacing="0">
<Label Text="Home"
FontFamily="RobotoCondensedRegular"
FontSize="Title" TextColor="Black"/>

<Label Text="Lorem Ipsum is"
FontFamily="RobotoCondensedBold"
FontSize="Micro" TextColor="Black"/>
</StackLayout>
Padding="35"
RowDefinitions="10*,27*,27*,10*,15*,12*"
ColumnDefinitions="*,*">

<NeoFrame
Grid.ColumnSpan="2"
Elevation=".25"
CornerRadius="10,10,10,10"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical" Spacing="0" Padding="0, 15" HorizontalOptions="Center">
<Label Text="Home"
FontFamily="RobotoCondensedRegular"
FontSize="Title" TextColor="Black"/>

<Label Text="Lorem Ipsum is"
FontFamily="RobotoCondensedBold"
FontSize="Micro" TextColor="Black" />
</StackLayout>
</NeoFrame>

<NeoButton Grid.Row="1"
Elevation=".25"
CornerRadius="20,10,10,10"
BackgroundColor="#e3edf7">

<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
VerticalOptions="Fill"
HorizontalOptions="Fill"
Padding="20">

<Image VerticalOptions="Start"
Expand All @@ -57,7 +50,7 @@
FontSize="Small"
TextColor="#95a3b8"
Margin="20"
VerticalOptions="EndAndExpand"/>
VerticalOptions="End"/>
</StackLayout>

</NeoButton>
Expand All @@ -69,8 +62,8 @@
BackgroundColor="#e3edf7">

<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
VerticalOptions="Fill"
HorizontalOptions="Fill"
Padding="20">

<Image VerticalOptions="Start"
Expand All @@ -85,7 +78,7 @@
Margin="20"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
VerticalOptions="End"/>

</StackLayout>
</NeoButton>
Expand All @@ -96,8 +89,8 @@
Clicked="NeoButton_Clicked"
BackgroundColor="#e3edf7">
<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
VerticalOptions="Fill"
HorizontalOptions="Fill"
Padding="20">

<Image VerticalOptions="Start"
Expand All @@ -112,7 +105,7 @@
FontSize="Small"
TextColor="#95a3b8"
Margin="20"
VerticalOptions="EndAndExpand"/>
VerticalOptions="End"/>
</StackLayout>
</NeoButton>

Expand All @@ -123,8 +116,8 @@
BackgroundColor="#e3edf7">

<StackLayout Orientation="Vertical"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
VerticalOptions="Fill"
HorizontalOptions="Fill"
Spacing="0"
Padding="20">

Expand All @@ -141,7 +134,7 @@
FontFamily="RobotoCondensedBold"
FontSize="Small"
TextColor="#95a3b8"
VerticalOptions="EndAndExpand"/>
VerticalOptions="End"/>
</StackLayout>
</NeoButton>

Expand All @@ -160,7 +153,7 @@
Thickness="20" BackgroundColor="#e3edf7" Grid.ColumnSpan="2">

<StackLayout Orientation="Horizontal"
HorizontalOptions="FillAndExpand">
HorizontalOptions="Fill">

<BoxView Margin="40,28,15,28" WidthRequest=".8" Color="#95a3b8" />
<BoxView Margin="15,28" WidthRequest=".8" Color="#95a3b8" />
Expand All @@ -172,7 +165,7 @@
<Label Text="32°C"
TextColor="#95a3b8"
FontFamily="RobotoCondensedBold"
VerticalOptions="FillAndExpand"
VerticalOptions="Fill"
VerticalTextAlignment="Center"/>
</StackLayout>
</NeoProgressView>
Expand All @@ -183,7 +176,7 @@

<NeoButton WidthRequest="60"
CornerRadius="10"
HorizontalOptions="CenterAndExpand"
HorizontalOptions="Center"
ClickMode="Toggle"
BackgroundColor="#e3edf7"
Elevation=".25">
Expand All @@ -196,7 +189,7 @@

<NeoButton WidthRequest="60"
CornerRadius="10"
HorizontalOptions="CenterAndExpand"
HorizontalOptions="Center"
ClickMode="Toggle"
Elevation=".25"
BackgroundColor="#e3edf7">
Expand All @@ -209,7 +202,7 @@

<NeoButton WidthRequest="60"
CornerRadius="10"
HorizontalOptions="CenterAndExpand"
HorizontalOptions="Center"
ClickMode="Toggle"
Elevation=".25"
BackgroundColor="#e3edf7">
Expand All @@ -221,7 +214,7 @@
</NeoButton>

<NeoButton WidthRequest="60"
HorizontalOptions="CenterAndExpand"
HorizontalOptions="Center"
CornerRadius="10"
ClickMode="Toggle"
Elevation=".25"
Expand Down
5 changes: 5 additions & 0 deletions Maui.NeoControls.Demo/Maui.NeoControls.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@
<ProjectReference Include="..\Maui.NeoControls\Maui.NeoControls.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.80" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.80" />
</ItemGroup>

</Project>
6 changes: 4 additions & 2 deletions Maui.NeoControls/Maui.NeoControls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SkiaSharp.Views.Maui.Controls" Version="2.88.6" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.80" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.80" />
<PackageReference Include="SkiaSharp.Views.Maui.Controls" Version="2.88.8" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.133" />
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.143" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions Maui.NeoControls/NeoView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
x:Class="Maui.NeoControls.NeoView">
<ContentView.Content>
<Grid x:Name="rootView"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
VerticalOptions="Fill"
HorizontalOptions="Fill"
Margin="0">

<skia:SKCanvasView x:Name="canvas"
PaintSurface="OnCanvasViewPaintSurface"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"/>
VerticalOptions="Fill"
HorizontalOptions="Fill"/>
</Grid>
</ContentView.Content>
</ContentView>

0 comments on commit e17e90b

Please sign in to comment.