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

Make Inheritance Margin Zoom Level is divided by 100 #54828

Conversation

Cosifne
Copy link
Member

@Cosifne Cosifne commented Jul 14, 2021

@Cosifne Cosifne requested a review from a team as a code owner July 14, 2021 21:21

// ZoomLevel is 100 based. (e.g. 150%, 100%)
// ScaleFactor is 1 based. (e.g. 1.5, 1)
var scaleFactor = zoomLevel / 100;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I move the zoom level -> scaleFactor conversion here so that this could be covered by the unit test change below

Dim actualViewModel = InheritanceMarginViewModel.Create(
classificationTypeMap, classificationFormatMap.GetClassificationFormatMap("tooltip"), acutalTag, 1)
classificationTypeMap, classificationFormatMap.GetClassificationFormatMap("tooltip"), acutalTag, 100)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the unit tests below are expecting a ViewModel that has 1 scaleFactor, change the value here to be 100 to match TextView.ZoomLevel, it will make sure the conversion is not missed

@CyrusNajmabadi
Copy link
Member

Seems good on my machine now :)

@Cosifne Cosifne merged commit 0788cd6 into dotnet:release/dev16.11 Jul 20, 2021
@Cosifne Cosifne deleted the dev/shech/InheritanceMarginZoomLevelFix branch July 20, 2021 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants