Skip to content

Conversation

@abrahamwolk
Copy link
Collaborator

This pull request fixes a bug introduced in #3489: when determining whether the width and height specified in outline or in model should be used for computing the zoom-level when zooming, layoutBoundsWithoutScrollbars should be compared against instead of layoutBoundsWithoutScrollbars. I have tested this change manually in the Display Builder.

…'layoutBoundsWithScrollbars' in if-condition.
Copy link
Contributor

@jacomago jacomago left a comment

Choose a reason for hiding this comment

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

Would be nice if commit explained "why" the change rather than just the "what".

@abrahamwolk
Copy link
Collaborator Author

Would be nice if commit explained "why" the change rather than just the "what".

I don't have a full understanding of the underlying cause, but this pull request is intended to restore the logic described here:

// 'outline' will wrap the actual widgets when the display
// is larger than the available viewport.
// So it can be used to zoom 'out'.
// But when the viewport is much larger than the widget,
// the JavaFX outline grows to fill the viewport,
// so falling back to the self-declared model width and height
// to zoom 'in'.
// This requires displays to be created with
// correct width/height properties.

In #3489, I had changed the logic (as part of a larger change), so that it was not the case that the full viewport was considered in the comparison.

Empirically, it also seems that the fix works.

@abrahamwolk abrahamwolk merged commit 32ed721 into master Nov 3, 2025
3 checks passed
@abrahamwolk abrahamwolk deleted the CSSTUDIO-3523 branch November 3, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants