Skip to content

SWR matplotlib__matplotlib-16710 - #64

Open
richeshgupta wants to merge 1 commit into
swr-base-bfaa382from
swr-head-bfaa382
Open

richeshgupta wants to merge 1 commit into
swr-base-bfaa382from
swr-head-bfaa382

Conversation

@richeshgupta

Copy link
Copy Markdown

SWRBench case matplotlib__matplotlib-16710: pinned base d0fc2e9 to head bfaa382 of matplotlib#16710. Benchmark replay, not for merge.

@razorpay-slash razorpay-slash Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated code review

Reviewed up to bfaa382.
All 5 reviewers completed.

Comment thread src/_macosx.m
[messagebox.layoutManager ensureLayoutForTextContainer: messagebox.textContainer];
NSRect contentSize = [messagebox.layoutManager usedRectForTextContainer: messagebox.textContainer];
rect = [messagebox frame];
rect.origin.y = 0.5 * (self->height - contentSize.size.height);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MEDIUM] Toolbar message is drawn outside the toolbar when wrapped text is taller than the toolbar

Issue

The added centering code computes rect.origin.y = 0.5 * (self->height - contentSize.size.height) with no bound on the laid-out text height, so any message that wraps past the 36pt toolbar height gets a negative origin.y; the frame height is never grown and the textview is not clipped, so the wrapped lines are drawn over the axes below the toolbar instead of inside it. set_message accepts an unbounded caller-supplied string, making this reachable in normal use.

Evidence

SUSPECTED: A test in the macosx backend that calls set_message with a ~200-character message and asserts the messagebox frame stays within the toolbar view's bounds would settle it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants