Skip to content

Commit 799a4d9

Browse files
TextInputLayout layout changes are reverted
1 parent 1e57b36 commit 799a4d9

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

maui/src/TextInputLayout/SfTextInputLayout.Properties.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2197,15 +2197,14 @@ static void OnIsHintFloatedPropertyChanged(BindableObject bindable, object oldVa
21972197
{
21982198
if (bindable is SfTextInputLayout inputLayout && newValue is bool value)
21992199
{
2200-
double minOpacity = DeviceInfo.Platform.ToString() switch
2201-
{
2202-
nameof(DevicePlatform.MacCatalyst) => 0.011,
2203-
nameof(DevicePlatform.iOS) => 0.00001,
2204-
nameof(DevicePlatform.Android) => 0.00001,
2205-
_ => 0
2206-
};
2207-
2208-
double targetOpacity = value ? 1 : minOpacity;
2200+
double minOpacity = 0;
2201+
#if ANDROID || IOS
2202+
minOpacity = 0.00001;
2203+
#elif MACCATALYST
2204+
minOpacity = 0.011;
2205+
#endif
2206+
2207+
double targetOpacity = value ? 1 : minOpacity;
22092208

22102209
if (inputLayout.Content is InputView || inputLayout.Content is Microsoft.Maui.Controls.Picker)
22112210
{

maui/src/TextInputLayout/SfTextInputLayout.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -879,13 +879,13 @@ protected override void OnContentChanged(object oldValue, object newValue)
879879
{
880880
UpdateContentMargin(view);
881881
}
882-
double minOpacity = DeviceInfo.Platform.ToString() switch
883-
{
884-
nameof(DevicePlatform.MacCatalyst) => 0.011,
885-
nameof(DevicePlatform.iOS) => 0.00001,
886-
nameof(DevicePlatform.Android) => 0.00001,
887-
_ => 0
888-
};
882+
883+
double minOpacity = 0;
884+
#if ANDROID || IOS
885+
minOpacity = 0.00001;
886+
#elif MACCATALYST
887+
minOpacity = 0.011;
888+
#endif
889889

890890
//For placeholder overlap issue here handled the opacity value for controls.
891891
if (newValue is InputView entryEditorContent)

0 commit comments

Comments
 (0)