Skip to content
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

Don't bother with manually resizing the Qt main window. #14703

Merged
merged 1 commit into from Aug 24, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jul 5, 2019

The presence of FigureCanvasQT.sizeHint is sufficient to get a correct
figure size; Qt properly determines the entire window size based on
that.

This behavior is already tested by test_backend_qt::test_dpi_ratio_change,
and one can also manually check that the patch does not change physical
window sizes when creating figures of various figsize=(?).

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

The presence of FigureCanvasQT.sizeHint is sufficient to get a correct
figure size; Qt properly determines the entire window size based on
that.

This behavior is already tested by test_backend_qt::test_dpi_ratio_change,
and one can also manually check that the patch does not change physical
window sizes when creating figures of various figsize=(?).
@anntzer anntzer added the GUI: Qt label Jul 5, 2019
@tacaswell tacaswell added this to the v3.2.0 milestone Jul 5, 2019
@QuLogic QuLogic requested a review from tacaswell July 25, 2019 08:34
Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

QT is designed to get this right by itself. We need not and shouldn't try and explicitly calculate window sizes ourselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants