Skip to content

Conversation

Cosifne
Copy link
Member

@Cosifne Cosifne commented Aug 22, 2024

Fix: #74035

Current behavior:
image

After:
image

@Cosifne Cosifne requested a review from a team as a code owner August 22, 2024 03:11
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 22, 2024
{
var zoomTransform = new ScaleTransform(_scaleFactor, _scaleFactor);
zoomTransform.Freeze();
LayoutTransform = zoomTransform;
Copy link
Member

Choose a reason for hiding this comment

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

nit. can this be a local function? or just inline entirely in to the constructor.

private readonly IUIThreadOperationExecutor _operationExecutor;
private readonly Workspace _workspace;
private readonly IAsynchronousOperationListener _listener;
private readonly double _scaleFactor;
Copy link
Member

Choose a reason for hiding this comment

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

do you need to acctually save this? it appears to only be used once.

_listener = listener;
_scaleFactor = scaleFactor;
InitializeComponent();
SetZoom();
Copy link
Member

Choose a reason for hiding this comment

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

can this just be:

Suggested change
SetZoom();
this.LayoutTransformation = new ScaleTransform(scaleFactor, scaleFactor).Freeze();

?

Copy link
Contributor

@sharwell sharwell Aug 22, 2024

Choose a reason for hiding this comment

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

The Freeze method returns void so it can't be quite this simple. An AsFrozen generic extension method would likely work.

Copy link
Member

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

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

Signing off. Up to you if you can simplify here.

@Cosifne Cosifne enabled auto-merge August 22, 2024 16:52
@Cosifne Cosifne merged commit 439bea0 into dotnet:main Aug 22, 2024
25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Aug 22, 2024
@Cosifne Cosifne deleted the dev/shech/InheritanceMarginZoom branch August 22, 2024 18:19
@dibarbet dibarbet modified the milestones: Next, 17.12 P2 Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Needs UX Triage untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inheritance margin doesn't work well with screen scaling
4 participants