Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Fix Button image sizing and layout #22476

Merged
merged 73 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
84067e1
Changes from the original Button PR #21759
tj-devel709 Apr 10, 2024
6bc8ab2
Move the button layout code to ArrangeOverride
tj-devel709 May 16, 2024
762721c
Add UITests and remove internal
tj-devel709 May 17, 2024
61f06de
Didn't add the screenshots
tj-devel709 May 17, 2024
11c8bee
Add MeasureOverride and related changes
tj-devel709 May 20, 2024
616328c
Added snapshot
jsuarezruiz May 20, 2024
5b2a233
More snapshots
jsuarezruiz May 20, 2024
38d809d
add android screenshot 3/4
tj-devel709 May 20, 2024
55e1ac2
add android screenshot 4/4
tj-devel709 May 21, 2024
4fdb78b
add additional UITest
tj-devel709 May 21, 2024
f91cd07
comments and android snapshot 1/4
tj-devel709 May 21, 2024
e252e0f
Add BorderWidth to the calculations
tj-devel709 May 21, 2024
a6aae41
Android snapshot 2/4
tj-devel709 May 21, 2024
c19a8aa
add text to sample button
tj-devel709 May 22, 2024
47a6948
Android snapshot 2/4 redo
tj-devel709 May 22, 2024
de30c55
borderWidth UITest
tj-devel709 May 22, 2024
b8f96ce
iOS borderwidth screenshots
tj-devel709 May 22, 2024
b33d9b8
add to unshipped
tj-devel709 May 23, 2024
577ea40
Not sure why this line was duplicated
tj-devel709 May 23, 2024
a296110
add margins to measurements and more screenshots
tj-devel709 May 23, 2024
d13c20c
more android and windows screenshots
tj-devel709 May 23, 2024
fe9a844
add borderColor since it is not default on Android
tj-devel709 May 23, 2024
8599f01
more screenshots
tj-devel709 May 24, 2024
a26514d
Move layout and measure code into the MeasureArrange
tj-devel709 May 30, 2024
97c7ddc
Use the correct spacing for sizing the image up - improved behavior
tj-devel709 May 30, 2024
ed3f7ae
Use better measurements for the title
tj-devel709 Jun 20, 2024
ce8c05b
Remove removed method
tj-devel709 Jun 21, 2024
5976da5
Add special case for vertical image placements and non-fill horizonta…
tj-devel709 Jun 24, 2024
467e7c5
Round the measured size up to try to match existing behavior
tj-devel709 Jun 25, 2024
fe2787a
try just using the regular boundingRect
tj-devel709 Jun 25, 2024
0014873
Move arranging code to ArrangeOverride
tj-devel709 Jun 26, 2024
4abe761
clean up and sometimes use the DeviceMetrics for boundingRect
tj-devel709 Jun 26, 2024
fda1392
More documentation and clean up
tj-devel709 Jun 27, 2024
06ff062
Update screenshots
tj-devel709 Jun 27, 2024
dc8bc04
wrong operator and fix documentation
tj-devel709 Jun 27, 2024
41a26e1
Add back in the margin calculation. This was lost on accident
tj-devel709 Jun 28, 2024
33187ce
Always add the margin to our measureArrange Size
tj-devel709 Jun 28, 2024
c4114d4
Use the CrossPlatformLayout similar to MauiView
tj-devel709 Jul 2, 2024
4130f8e
Remove changes to UITest.cs
tj-devel709 Jul 2, 2024
c031728
Update UITest Snapshots
tj-devel709 Jul 2, 2024
72389fd
fix the unshipped.txt files
tj-devel709 Jul 2, 2024
eb85e4d
next wave of new screenshots
tj-devel709 Jul 2, 2024
fb0a21c
next wave of new screenshots 2
tj-devel709 Jul 3, 2024
060ce04
add delay to UITest and update more screenshots
tj-devel709 Jul 3, 2024
3e8421b
removing the spacing parameter and refactor the titleRect
tj-devel709 Jul 3, 2024
4f0c5e0
try to use exact width of title if available and allow more space for…
tj-devel709 Jul 19, 2024
b99484d
change tests and other various small fixes
tj-devel709 Jul 19, 2024
bc589e4
Remove padding from titleRect measurements
tj-devel709 Aug 2, 2024
69c51cc
Add required padding in scenarios to not truncate text if padding not…
tj-devel709 Aug 7, 2024
edca1e4
manually measure titleRect on first measure in case elements are pres…
tj-devel709 Aug 8, 2024
9542cea
re-enable updatePadding since ImageButton relies on it
tj-devel709 Aug 8, 2024
c57ee0b
new screenshots 1
tj-devel709 Aug 8, 2024
a064401
new screenshots 2
tj-devel709 Aug 9, 2024
18af3d7
new screenshots 3
tj-devel709 Aug 9, 2024
a2677ab
new screenshots 4
tj-devel709 Aug 9, 2024
857f714
Add multiple screens of button tests
tj-devel709 Aug 9, 2024
990f2e9
add using statements
tj-devel709 Aug 10, 2024
834294b
use the right issue
tj-devel709 Aug 10, 2024
fdf1a9b
new test screenshots 1
tj-devel709 Aug 10, 2024
675a120
new test screenshots 2
tj-devel709 Aug 10, 2024
16cb06c
new test screenshots 3
tj-devel709 Aug 12, 2024
9694bb6
some extra clean up
tj-devel709 Aug 12, 2024
3df2e90
add comment and include the right image
tj-devel709 Aug 12, 2024
b854e0d
new test screenshots 4
tj-devel709 Aug 13, 2024
046ddf5
add automation ID and try changing ios screenshot again
tj-devel709 Aug 13, 2024
bf7846f
use the spacing appropriately in the top and bottom image buttons
tj-devel709 Aug 15, 2024
f32cf48
more screenshots
tj-devel709 Aug 15, 2024
7a5bbcc
screenshots from ci
tj-devel709 Aug 16, 2024
1168862
more screenshots from cake tool
tj-devel709 Aug 16, 2024
0c2bdf8
remove waiting for grid on windows uitest
tj-devel709 Aug 19, 2024
b6f0925
try windows uiscreenshots manually created
tj-devel709 Aug 19, 2024
5ea2ffc
new screenshots
tj-devel709 Aug 20, 2024
61886b8
new screenshots 2
tj-devel709 Aug 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
ContentLayout="Right" TextColor="White" Background="Black"
ImageSource="settings.png" Text="settings" />
<Label
Text="Click To Change Positionng"
Text="Click To Change Positioning"
Style="{StaticResource Headline}"/>
<Button
x:Name="positionChange" ContentLayout="Top" TextColor="White" Background="Black"
Expand Down Expand Up @@ -245,6 +245,20 @@
<Button
Text="End"
HorizontalOptions="End" />
<Label
Text="Slide to change the Border Width:"
Style="{StaticResource Headline}"/>
<Button
Text="BorderWidth Changing"
ImageSource="settings.png"
HorizontalOptions="Center"
BackgroundColor="Green"
BorderWidth="{Binding Source={x:Reference BorderWidthSlider}, Path=Value}" />
<Slider
x:Name="BorderWidthSlider"
Minimum="0"
Maximum="100"
Value ="0"/>
</VerticalStackLayout>
</ScrollView>
</views:BasePage.Content>
Expand Down
1 change: 1 addition & 0 deletions src/Controls/src/Core/Button/Button.Mapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public partial class Button
ButtonHandler.Mapper.ReplaceMapping<Button, IButtonHandler>(nameof(ContentLayout), MapContentLayout);
#if IOS
ButtonHandler.Mapper.ReplaceMapping<Button, IButtonHandler>(nameof(Padding), MapPadding);
ButtonHandler.Mapper.ReplaceMapping<Button, IButtonHandler>(nameof(BorderWidth), MapBorderWidth);
#endif
#if WINDOWS
ButtonHandler.Mapper.ReplaceMapping<Button, IButtonHandler>(nameof(ImageSource), MapImageSource);
Expand Down
Loading
Loading