Bug 14529 - EntryElement's input field is misaligned
Summary: EntryElement's input field is misaligned
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll (show other bugs)
Version: 6.9.5.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
Depends on:
Reported: 2013-09-08 00:20 UTC by Zhenya
Modified: 2017-03-06 16:36 UTC (History)
2 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:

Test Case (8.95 KB, application/zip)
2017-03-06 16:36 UTC, Alex Soto [MSFT]

Description Zhenya 2013-09-08 00:20:10 UTC
The input field inside EntryElement is created with an incorrect frame which causes image distortion on iPad 2 (at least). The problem is that frame's y coordinate is not an integer. Here is how it is calculated (MonoTouch.Dialog/Element.cs):
float yOffset = (cell.ContentView.Bounds.Height - size.Height) / 2 - 1;

I believe it should be like this instead:
float yOffset = Math.Round((cell.ContentView.Bounds.Height - size.Height) / 2 - 1);

You can see the distortion especially well if you turn on Color Misaligned Images option in the Device Emulator.
Comment 1 Alex Soto [MSFT] 2017-03-06 16:36:26 UTC
Created attachment 20156 [details]
Test Case
Comment 2 Alex Soto [MSFT] 2017-03-06 16:36:48 UTC
I can confirm this issue still exist

Note You need to log in before you can comment on or make changes to this bug.