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

[FIX] Fix axes in PNG export #253

Merged
merged 2 commits into from
Sep 15, 2023

Conversation

markotoplak
Copy link
Member

Issue

Fixes biolab/orange3#6543

Description of changes

Display size is set after painting. This keeps proper display size (intention of #246 that solved bug #240) and fixes the obnoxious axis problems.

Includes
  • Code changes
  • Tests
  • Documentation

This seems to fix problems with missized (and disconnected axes) while
keeping proper display size.
@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2023

Codecov Report

Patch coverage: 25.00% and project coverage change: +0.03% 🎉

Comparison is base (ebc5230) 72.27% compared to head (e05874f) 72.31%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #253      +/-   ##
==========================================
+ Coverage   72.27%   72.31%   +0.03%     
==========================================
  Files          34       34              
  Lines        9068     9091      +23     
==========================================
+ Hits         6554     6574      +20     
- Misses       2514     2517       +3     
Files Changed Coverage Δ
orangewidget/io.py 73.43% <25.00%> (+0.06%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@markotoplak
Copy link
Member Author

The bug was reproduced by @noahnovsak on his laptop (Mac, external display disconnected) and @thocevar (Windows, with external display connected). Could you please report if this PR fixes your issues?

@PrimozGodec, can you double check that this PR does not reintroduce #240?

Copy link
Contributor

@PrimozGodec PrimozGodec left a comment

Choose a reason for hiding this comment

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

It doesn't break changes in #240. I could also reproduce the issue on my MacBook (without this PR) and I can confirm it is fixed by this PR.

@thocevar
Copy link
Contributor

Fixed on Windows as well.

There is another separate problem (not introduced by this fix). It doesn't take into account global scaling. With a global 125% scaling it exports a smaller image which has a lower quality when rescaled to match the image on the screen.

@markotoplak markotoplak merged commit c817eed into biolab:master Sep 15, 2023
21 of 22 checks passed
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.

Plot axes not matching with graphs when copying to clipboard or saving as .png
5 participants