Skip to content

Commit

Permalink
Replace Frame with Border (#542)
Browse files Browse the repository at this point in the history
* Replace Frame with Border.

* Replace Frame with Border.

* Remove stray file.

* Replace Frame with Border

* Replace Frame with Border

* Fix height.

* Bump xcode.

* Fix build and some minor improvements

* Xcode

---------

Co-authored-by: Gerald Versluis <[email protected]>
  • Loading branch information
davidbritch and jfversluis authored Nov 27, 2024
1 parent 086ffb4 commit 59a8876
Show file tree
Hide file tree
Showing 70 changed files with 1,106 additions and 1,099 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ jobs:

- name: Install .NET MAUI Workload
run: dotnet workload install maui
# if: runner.os == 'macOS' # reenable when .NET 8 is default on hosted runners

- name: Select Xcode Version
run: sudo xcode-select -s /Applications/Xcode_16.app
run: sudo xcode-select -s /Applications/Xcode_16.1.app
if: runner.os == 'macOS'

- name: Find and build all C# projects
Expand Down Expand Up @@ -75,7 +74,12 @@ jobs:
$proj_dir = [System.IO.Path]::GetDirectoryName($csproj)
Write-Output "Cleaning up bin & obj in $proj_dir"
Get-ChildItem -Path $proj_dir -Directory -Recurse -Include bin,obj | Remove-Item -Recurse -Force
try {
Get-ChildItem -Path $proj_dir -Directory -Recurse -Include bin,obj | Remove-Item -Recurse -Force
} catch {
Write-Output "::warning:: Failed to clean up bin & obj in $proj_dir"
}
Write-Output "::endgroup::"
}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ jobs:

- name: Install .NET MAUI Workload
run: dotnet workload install maui
# if: runner.os == 'macOS' # reenable when .NET 8 is default on hosted runners

- name: Select Xcode Version
run: sudo xcode-select -s /Applications/Xcode_16.app
run: sudo xcode-select -s /Applications/Xcode_16.1.app
if: runner.os == 'macOS'

- name: Find and build changed projects
Expand Down Expand Up @@ -112,7 +111,12 @@ jobs:
$proj_dir = [System.IO.Path]::GetDirectoryName($projectToBuild)
Write-Output "Cleaning up bin & obj in $proj_dir"
Get-ChildItem -Path $proj_dir -Directory -Recurse -Include bin,obj | Remove-Item -Recurse -Force
try {
Get-ChildItem -Path $proj_dir -Directory -Recurse -Include bin,obj | Remove-Item -Recurse -Force
} catch {
Write-Output "::warning:: Failed to clean up bin & obj in $proj_dir"
}
Write-Output "::endgroup::"
}
Expand Down
11 changes: 5 additions & 6 deletions 9.0/Animations/Animations/Resources/Styles/Styles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@


<ControlTemplate x:Key="EasingBox">
<Frame HasShadow="False"
BorderColor="{AppThemeBinding Dark=#000000, Light=#f1f1f1}"
BackgroundColor="{AppThemeBinding Dark=#000000, Light=#f1f1f1}"
CornerRadius="0"
Margin="6">
<Border Stroke="{AppThemeBinding Dark=#000000, Light=#f1f1f1}"
BackgroundColor="{AppThemeBinding Dark=#000000, Light=#f1f1f1}"
Margin="6"
Padding="6">
<Grid RowDefinitions="*,40">
<Grid x:Name="AxisGrid" Opacity="0">
<Path Data="M1 0v84h124"
Expand All @@ -31,7 +30,7 @@
Grid.Row="1"
HorizontalOptions="Center" VerticalOptions="End"/>
</Grid>
</Frame>
</Border>
</ControlTemplate>

<Style TargetType="controls:EasingCard">
Expand Down
235 changes: 145 additions & 90 deletions 9.0/Apps/PointOfSale/src/PointOfSale/Pages/SettingsPage.xaml

Large diffs are not rendered by default.

269 changes: 134 additions & 135 deletions 9.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/Pages/FavoritesPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,179 +7,178 @@
ios:Page.UseSafeArea="True"
Title="Favorites"
Shell.NavBarIsVisible="{OnIdiom True, Desktop=False}"
x:Class="WeatherTwentyOne.Pages.FavoritesPage"
>
x:Class="WeatherTwentyOne.Pages.FavoritesPage">
<ContentPage.Resources>
<DataTemplate x:Key="FavTemplate">
<Frame
Padding="0"
CornerRadius="20"
HasShadow="False"
x:DataType="c:Location"
BackgroundColor="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource Background_Mid}}">
<Grid
RowDefinitions="42,40,*"
Padding="20">
<Image
Source="{Binding Icon}"
WidthRequest="36"
HeightRequest="36"
VerticalOptions="Start"
HorizontalOptions="End"/>

<Label Text="{Binding Value}" class="LargeTitle"
/>

<VerticalStackLayout
Spacing="0"
Grid.RowSpan="3"
VerticalOptions="Center">
<Label Text="{Binding Name}" class="Subhead" />
<Label Text="{Binding WeatherStation}" class="SubContent"/>
<Border Padding="0"
StrokeShape="RoundRectangle 20"
x:DataType="c:Location"
BackgroundColor="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource Background_Mid}}">
<Grid RowDefinitions="42,40,*"
Padding="20">
<Image Source="{Binding Icon}"
WidthRequest="36"
HeightRequest="36"
VerticalOptions="Start"
HorizontalOptions="End" />

<Label Text="{Binding Value}"
class="LargeTitle" />

<VerticalStackLayout Spacing="0"
Grid.RowSpan="3"
VerticalOptions="Center">
<Label Text="{Binding Name}"
class="Subhead" />
<Label Text="{Binding WeatherStation}"
class="SubContent" />
</VerticalStackLayout>

<HorizontalStackLayout
Grid.Row="2"
Spacing="10"
VerticalOptions="End">
<Image Source="solid_umbrella.png" VerticalOptions="Center"
WidthRequest="20" HeightRequest="20"/>
<Label Text="13%" class="Small" VerticalOptions="Center"/>
<HorizontalStackLayout Grid.Row="2"
Spacing="10"
VerticalOptions="End">
<Image Source="solid_umbrella.png"
VerticalOptions="Center"
WidthRequest="20"
HeightRequest="20" />
<Label Text="13%"
class="Small"
VerticalOptions="Center" />
</HorizontalStackLayout>

<HorizontalStackLayout
Grid.Row="2"
Spacing="10"
HorizontalOptions="End"
VerticalOptions="End">
<Image Source="solid_humidity.png" VerticalOptions="Center"
WidthRequest="20" HeightRequest="20"/>
<Label Text="45%" class="Small" VerticalOptions="Center"/>
<HorizontalStackLayout Grid.Row="2"
Spacing="10"
HorizontalOptions="End"
VerticalOptions="End">
<Image Source="solid_humidity.png"
VerticalOptions="Center"
WidthRequest="20"
HeightRequest="20" />
<Label Text="45%"
class="Small"
VerticalOptions="Center" />
</HorizontalStackLayout>
</Grid>
</Frame>
</Border>




</DataTemplate>

<DataTemplate x:Key="FavBorderTemplate">
<Border
Margin="{OnIdiom Phone=15,Default=25}"
Padding="0"
HorizontalOptions="Start"
HeightRequest="154"
WidthRequest="154"
Stroke="Transparent"
StrokeThickness="1"
BackgroundColor="{StaticResource Background_Mid}"
x:DataType="c:Location"
>
<Border Margin="{OnIdiom Phone=15,Default=25}"
Padding="0"
HorizontalOptions="Start"
HeightRequest="154"
WidthRequest="154"
Stroke="Transparent"
StrokeThickness="1"
BackgroundColor="{StaticResource Background_Mid}"
x:DataType="c:Location">
<Border.StrokeShape>
<RoundRectangle CornerRadius="40"/>
<RoundRectangle CornerRadius="40" />
</Border.StrokeShape>
<Grid
RowDefinitions="42,40,*"
Padding="20">
<Image
Source="{Binding Icon}"
WidthRequest="36"
HeightRequest="36"
VerticalOptions="Start"
HorizontalOptions="End"/>

<Label Text="{Binding Value}" class="LargeTitle"
/>

<VerticalStackLayout
Spacing="0"
Grid.RowSpan="3"
VerticalOptions="Center">
<Label Text="{Binding Name}" class="Subhead" />
<Label Text="{Binding WeatherStation}" class="SubContent"/>
<Grid RowDefinitions="42,40,*"
Padding="20">
<Image Source="{Binding Icon}"
WidthRequest="36"
HeightRequest="36"
VerticalOptions="Start"
HorizontalOptions="End" />

<Label Text="{Binding Value}"
class="LargeTitle" />

<VerticalStackLayout Spacing="0"
Grid.RowSpan="3"
VerticalOptions="Center">
<Label Text="{Binding Name}"
class="Subhead" />
<Label Text="{Binding WeatherStation}"
class="SubContent" />
</VerticalStackLayout>

<HorizontalStackLayout
Grid.Row="2"
Spacing="10"
VerticalOptions="End">
<Image Source="solid_umbrella.png" VerticalOptions="Center"
WidthRequest="20" HeightRequest="20"/>
<Label Text="13%" class="Small" VerticalOptions="Center"/>
<HorizontalStackLayout Grid.Row="2"
Spacing="10"
VerticalOptions="End">
<Image Source="solid_umbrella.png"
VerticalOptions="Center"
WidthRequest="20"
HeightRequest="20" />
<Label Text="13%"
class="Small"
VerticalOptions="Center" />
</HorizontalStackLayout>

<HorizontalStackLayout
Grid.Row="2"
Spacing="10"
HorizontalOptions="End"
VerticalOptions="End">
<Image Source="solid_humidity.png" VerticalOptions="Center"
WidthRequest="20" HeightRequest="20"/>
<Label Text="45%" class="Small" VerticalOptions="Center"/>
<HorizontalStackLayout Grid.Row="2"
Spacing="10"
HorizontalOptions="End"
VerticalOptions="End">
<Image Source="solid_humidity.png"
VerticalOptions="Center"
WidthRequest="20"
HeightRequest="20" />
<Label Text="45%"
class="Small"
VerticalOptions="Center" />
</HorizontalStackLayout>
</Grid>
</Border>
</DataTemplate>
</ContentPage.Resources>


<!-- Main Section -->
<ScrollView>
<VerticalStackLayout>

<!-- Search Box -->
<HorizontalStackLayout
VerticalOptions="Start"
Spacing="18"
Padding="{OnIdiom Phone='15,15,15,15', Default='25,25,25,0'}"
>
<Image
Source="search_icon.png"
VerticalOptions="Center"
HeightRequest="22"
WidthRequest="22"/>
<Label
Text="Search"
TextColor="#637989"
FontSize="18"
WidthRequest="240"
VerticalOptions="Center"/>
</HorizontalStackLayout>

<!-- Actual Content -->
<CollectionView
Margin="15"
ItemsSource="{Binding Favorites}"
ItemTemplate="{StaticResource FavTemplate}">


<!-- Main Section -->
<ScrollView>
<VerticalStackLayout>

<!-- Search Box -->
<HorizontalStackLayout VerticalOptions="Start"
Spacing="18"
Padding="{OnIdiom Phone='15,15,15,15', Default='25,25,25,0'}">
<Image Source="search_icon.png"
VerticalOptions="Center"
HeightRequest="22"
WidthRequest="22" />
<Label Text="Search"
TextColor="#637989"
FontSize="18"
WidthRequest="240"
VerticalOptions="Center" />
</HorizontalStackLayout>

<!-- Actual Content -->
<CollectionView Margin="15"
ItemsSource="{Binding Favorites}"
ItemTemplate="{StaticResource FavTemplate}">
<CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Vertical"
Span="2"
VerticalItemSpacing="8"
HorizontalItemSpacing="8"/>
HorizontalItemSpacing="8" />
</CollectionView.ItemsLayout>
<CollectionView.FooterTemplate>
<DataTemplate>
<Border
HeightRequest="132"
WidthRequest="132"
HorizontalOptions="Start"
Margin="{OnIdiom Phone=15,Default=25}"
Stroke="Transparent"
StrokeThickness="1"
BackgroundColor="{StaticResource Background_Mid}">
<Border HeightRequest="132"
WidthRequest="132"
HorizontalOptions="Start"
Margin="{OnIdiom Phone=15,Default=25}"
Stroke="Transparent"
StrokeThickness="1"
BackgroundColor="{StaticResource Background_Mid}">
<Border.StrokeShape>
<RoundRectangle CornerRadius="60"/>
<RoundRectangle CornerRadius="60" />
</Border.StrokeShape>
<ImageButton
BackgroundColor="Transparent"
Source="add_icon.png"
VerticalOptions="Center" HorizontalOptions="Center"/>
<ImageButton BackgroundColor="Transparent"
Source="add_icon.png"
VerticalOptions="Center"
HorizontalOptions="Center" />
</Border>
</DataTemplate>
</CollectionView.FooterTemplate>
</CollectionView>

</VerticalStackLayout>
</ScrollView>
</ScrollView>

</ContentPage>
Loading

0 comments on commit 59a8876

Please sign in to comment.