Skip to content

Commit

Permalink
Revert ios button changes (#22300)
Browse files Browse the repository at this point in the history
* Revert changes for iOS Button Layout Fixes

* Revert "[iOS] Allow compat iOS buttons to resize image and to respect spacing and padding (#21759)"

This reverts commit 63eb6b6.

# Conflicts:
#	src/Controls/tests/UITests/snapshots/ios/Issue18242Test.png
  • Loading branch information
PureWeen committed May 9, 2024
1 parent 2994760 commit ddf9d7f
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 196 deletions.
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Maui.Controls.Sample.Issues.Issue22288"
Title="Issue22288">
<ScrollView AutomationId="outerScrollView">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<Grid Grid.Column="0" Grid.Row="2" Margin="20,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="4.5*" />
<RowDefinition Height="*" />
<RowDefinition Height="4.5*" />
</Grid.RowDefinitions>

<Label Grid.Column="0" Grid.Row="0" Text="Search by meal type" SemanticProperties.HeadingLevel="Level2" FontSize="24" FontAttributes="Bold" />
<ScrollView Grid.Column="0" Grid.Row="1" Orientation="Horizontal" Margin="0,0,0,10">
<StackLayout Orientation="Horizontal" Spacing="10" Padding="0,5">
<Button Text="Breakfast" ContentLayout="Top,0" ImageSource="dotnet_bot.png" Padding="5,15" />
<Button Text="Lunch" ContentLayout="Top,0" ImageSource="dotnet_bot.png" Padding="5,15" />
<Button Text="Dinner" ContentLayout="Top,0" ImageSource="dotnet_bot.png" Padding="5,15" />
<Button Text="Snack" ContentLayout="Top,0" ImageSource="dotnet_bot.png" Padding="5,15" />
<Button Text="Dessert" ContentLayout="Top,0" ImageSource="dotnet_bot.png" Padding="5,15"/>
<Button Text="Drinks" ContentLayout="Top,0" ImageSource="dotnet_bot.png" Padding="5,15" />
</StackLayout>
</ScrollView>

<Label Grid.Column="0" Grid.Row="2" Text="Search by diet" SemanticProperties.HeadingLevel="Level2" FontSize="24" FontAttributes="Bold" />

</Grid>
</Grid>
</ScrollView>
</ContentPage>
@@ -0,0 +1,14 @@
namespace Maui.Controls.Sample.Issues;
using System;
using Microsoft.Maui;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Xaml;

[Issue(IssueTracker.Github, 22288, "Top Button Content Causes Infinite Layout", PlatformAffected.iOS)]
public partial class Issue22288 : ContentPage
{
public Issue22288()
{
InitializeComponent();
}
}

0 comments on commit ddf9d7f

Please sign in to comment.