maui icon indicating copy to clipboard operation
maui copied to clipboard

Entry Height gets updated when loaded inside the RoundRectangle Shape

Open SuthiYuvaraj opened this issue 1 year ago • 10 comments

RootCause

In the case of a rounded rectangle, the stroke thickness is added to the measured size during each Measure call. As a result, for every input in the Entry control, the width and height of the rounded rectangle are updated.

This issue was introduced due to the following PRs: Rendering Shapes without explicit bounds. by VSadov · Pull Request #5817 · dotnet/maui (github.com) Fixed Android RoundRectangle border logic by jstedfast · Pull Request #17087 · dotnet/maui (github.com)

While reverting change in above PR, current fix is fixed and issue mentioned above PR replicates.

Description of Change

The fix ensures that the stroke thickness is added to the measured size only once by using a flag variable. Additionally, to handle cases where the StrokeThickness changes at runtime, the flag variable is reset when the StrokeThickness is updated, allowing the new value to be applied correctly.

Issues Fixed

Fixes #18092

Tested the behaviour in the following platforms

  • [x] Android
  • [x] Windows
  • [x] iOS
  • [x] Mac

Output Videos

Before Issue Fix After Issue Fix

SuthiYuvaraj avatar Oct 10 '24 06:10 SuthiYuvaraj

/azp run

jsuarezruiz avatar Oct 11 '24 11:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 11 '24 11:10 azure-pipelines[bot]

/azp run

PureWeen avatar Oct 21 '24 15:10 PureWeen

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 21 '24 15:10 azure-pipelines[bot]

/rebase

jsuarezruiz avatar Oct 23 '24 09:10 jsuarezruiz

/azp run

jsuarezruiz avatar Oct 23 '24 09:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 23 '24 09:10 azure-pipelines[bot]

/rebase

PureWeen avatar Oct 25 '24 00:10 PureWeen

/azp run

jsuarezruiz avatar Oct 25 '24 10:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 25 '24 10:10 azure-pipelines[bot]

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 29 '24 11:10 azure-pipelines[bot]

Could we align the behavior between all the shapes? #25166 (comment)

reply : https://github.com/dotnet/maui/pull/25166#discussion_r1942875473

sheiksyedm avatar Feb 12 '25 07:02 sheiksyedm

/azp run

jsuarezruiz avatar Feb 26 '25 07:02 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Feb 26 '25 07:02 azure-pipelines[bot]

@SuthiYuvaraj Could you rebase? Thanks in advance.

jsuarezruiz avatar Jun 09 '25 07:06 jsuarezruiz

/azp run

jsuarezruiz avatar Jun 13 '25 11:06 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Jun 13 '25 11:06 azure-pipelines[bot]

/rebase

jsuarezruiz avatar Jul 15 '25 12:07 jsuarezruiz

/azp run

jsuarezruiz avatar Jul 15 '25 12:07 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Jul 15 '25 12:07 azure-pipelines[bot]