-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
A margin variable is being constrained by dpi scale X instead of dpi Scale Y #8038
Comments
Good catch! I’m not aware of any situations in which Windows will scale the display differently in each axis, but it would be good for us to get this right regardless. Feel free to submit a PR! |
… on the height margin from dpiScale.DpiScaleX to dpiScale.DpiScaleY in Microsoft.Terminal.Wpf.TerminalControl.CalculateMargins().
@DHowett Thanks! I opened a PR, but noticed four of the automated checks failed.. i'm new to contributing to this repo, so am not sure why that may have happened? I submitted another very small PR of similar scope about 40 minutes later and everything passed, so am not sure what in this PR specifically caused some of the checks to fail.. or does the CICD system have issues intermittently?I notice looking through the logs that the checks were failing at the step to restore packages.. is there any way to re-trigger it if it fails outside of updating the PR? |
This PR resolves an issue I observed in Microsoft.Terminal.Wpf.TerminalControl.CalculateMargins(). Specifically, on line 194 in the project. In this example, the line: `height = controlSize.Height - (this.TerminalRendererSize.Height / dpiScale.DpiScaleX);` is associating the height margin with dpiScale.DpiScaleX instead of dpiScale.DpiScaleY. This PR changes the association to DpiScaleY. Closes #8038
This PR resolves an issue I observed in Microsoft.Terminal.Wpf.TerminalControl.CalculateMargins(). Specifically, on line 194 in the project. In this example, the line: `height = controlSize.Height - (this.TerminalRendererSize.Height / dpiScale.DpiScaleX);` is associating the height margin with dpiScale.DpiScaleX instead of dpiScale.DpiScaleY. This PR changes the association to DpiScaleY. Closes #8038 (cherry picked from commit c095a67)
🎉This issue was addressed in #8039, which has now been successfully released as Handy links: |
🎉This issue was addressed in #8039, which has now been successfully released as Handy links: |
Environment
Major Minor Build Revision
10 0 19041 546
Steps to reproduce
I noticed an issue while reading through: Microsoft.Terminal.Wpf.TerminalControl.CalculateMargins(). Specifically, on line 194 in the project. In this example, it is the line - height = controlSize.Height - (this.TerminalRendererSize.Height / dpiScale.DpiScaleX); :
private Thickness CalculateMargins(Size controlSize = default)
{
var dpiScale = VisualTreeHelper.GetDpi(this);
double width = 0, height = 0;
Expected behavior
Shouldn't height be constrained by dpiScale.DpiScaleY and not dpiScale.DpiScaleX?
Actual behavior
Height appears to be associated with dpiScale.DpiScaleX instead of dpiScale.DpiScaleY.
I'm happy to help change the variable if others agree that this is an issue.
The text was updated successfully, but these errors were encountered: