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

Fixing TabViewItem sub-pixel bugs #7174

Merged
merged 2 commits into from
Jun 6, 2022
Merged

Conversation

RBrid
Copy link
Contributor

@RBrid RBrid commented Jun 1, 2022

Fixing selected tab view item's

  • vertical expansion at scale factor >= 3.0 (internal issue 39713673),
  • bottom sub-pixel horizontal gap line (internal issue 39813419).

To fix the vertical expansion:
TabViewItem::UpdateTabGeometry() needed to subtract 1 instead of 1 / scaleFactor from the item's ActualHeight to avoid the SelectedBackgroundPath element being too tall and cause infinite layout cycles when scale factor >= 3.0.

To fix the sub-pixel gap below the selected tab view item:
The only way I found was to use a small vertical TranslateTransform in the new TabViewItem::UpdateSelectedBackgroundPathTranslateTransform() method for the SelectedBackgroundPath element. It's pushed down to snap to a full pixel offset.

Fixes have been validated by our internal customer.

@RBrid RBrid requested a review from ojhad June 1, 2022 01:57
@RBrid RBrid self-assigned this Jun 1, 2022
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jun 1, 2022
@RBrid
Copy link
Contributor Author

RBrid commented Jun 1, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@RBrid
Copy link
Contributor Author

RBrid commented Jun 2, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@RBrid RBrid marked this pull request as ready for review June 6, 2022 17:04
@ojhad ojhad added team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Jun 6, 2022
@RBrid RBrid merged commit 76d8ebe into main Jun 6, 2022
@RBrid RBrid deleted the user/regisb/TabViewSubPixelFixes1 branch June 6, 2022 23:17
kmahone pushed a commit that referenced this pull request Jun 15, 2022
* Fixing TabViewItem sub-pixel bugs

* Scope fix to post RS5 OS release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TabView team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants