Describe the bug
See feedback in PR https://github.com/microsoft/microsoft-ui-xaml/pull/667
refactor the orientation based helper methods to make them easier to understand.
There are two/three ways we could improve the helpers:
GetMajorSize
or GetPointerToMajorSize
What would be the best way to solve this @ranjeshj @StephenLPeters @jevansaks (because you were one of the people confronted with this during review) ?
@jevansaks had a pretty good solution in the PR comments I think which we could run with.
float& MajorSize(winrt::Rect &rect)
{
return isHorizontal ? rect.Width : rect.Height;
}
// use site:
MajorSize(bounds) = lineSize;
Seems like a good idea. I will create a PR for this soon if that's fine with you.
Sounds good. Thanks!