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
Set high DPI attributes when using PySide2 #5968
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Lukasz Migas <lukas.migas@yahoo.com>
Codecov Report
@@ Coverage Diff @@
## main #5968 +/- ##
=======================================
Coverage 90.19% 90.20%
=======================================
Files 615 615
Lines 52039 52039
=======================================
+ Hits 46939 46941 +2
+ Misses 5100 5098 -2
|
psobolewskiPhD
approved these changes
Jun 19, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and works on my end, but would be nice for a linux & windows user to double check.
jni
approved these changes
Jun 19, 2023
psobolewskiPhD
removed
the
ready to merge
Last chance for comments! Will be merged in ~24h
label
Jun 22, 2023
Czaki
pushed a commit
that referenced
this pull request
Jun 22, 2023
# Fixes/Closes Bugfix part of PR #5607 # Description Fixes issues with high resolution screens when using PySide2 as Qt binding since the logic to set High DPI attributes was only covering PyQt5. As a note, for Qt6 bindings these attributes are deprecated since they are applied by default and there is no way to deactivated them. In the other hand, there is still a needed for those attributes when using Qt5 bindings since there they are deactivated by default. # References See https://doc.qt.io/qtforpython-6/gettingstarted/porting_from2.html#class-function-deprecations Co-authored-by: Lukasz Migas <lukas.migas@yahoo.com>
melissawm
pushed a commit
to melissawm/napari
that referenced
this pull request
Jul 3, 2023
# Fixes/Closes Bugfix part of PR napari#5607 # Description Fixes issues with high resolution screens when using PySide2 as Qt binding since the logic to set High DPI attributes was only covering PyQt5. As a note, for Qt6 bindings these attributes are deprecated since they are applied by default and there is no way to deactivated them. In the other hand, there is still a needed for those attributes when using Qt5 bindings since there they are deactivated by default. # References See https://doc.qt.io/qtforpython-6/gettingstarted/porting_from2.html#class-function-deprecations Co-authored-by: Lukasz Migas <lukas.migas@yahoo.com>
GenevieveBuckley
pushed a commit
that referenced
this pull request
Aug 1, 2023
# Fixes/Closes Closes #1417 # Description This PR adds a new `font_size` attribute to the theme which is injected sporadically throughout the stylesheets. A fix for an issue on Windows (perhaps other OSs too?) that have multiple high-res screens connected (and use PySide2 as the backend) was done initially here but was moved to its own PR. See PR #5968 Before: - text in the app is way too small to use ![image](https://user-images.githubusercontent.com/25161821/223431336-1358824b-ef92-4a4c-998b-6438535533e4.png) After: - text is of expected size and can be changed by changing the `.font_size` attribute of the current theme ![image](https://user-images.githubusercontent.com/25161821/223431591-7c6cedf2-3e1d-48dd-bb69-f433e0f1b4f1.png) ## Type of change <!-- Please delete options that are not relevant. --> - [x] New feature (non-breaking change which adds functionality) # How has this been tested? <!-- Please describe the tests that you ran to verify your changes. --> - [x] all tests pass with my change - [x] I check if my changes works with both PySide and PyQt backends as there are small differences between the two Qt bindings. Co-authored-by: Daniel Althviz Moré <d.althviz10@uniandes.edu.co> Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
dstansby
pushed a commit
to dstansby/napari
that referenced
this pull request
Aug 2, 2023
# Fixes/Closes Closes napari#1417 # Description This PR adds a new `font_size` attribute to the theme which is injected sporadically throughout the stylesheets. A fix for an issue on Windows (perhaps other OSs too?) that have multiple high-res screens connected (and use PySide2 as the backend) was done initially here but was moved to its own PR. See PR napari#5968 Before: - text in the app is way too small to use ![image](https://user-images.githubusercontent.com/25161821/223431336-1358824b-ef92-4a4c-998b-6438535533e4.png) After: - text is of expected size and can be changed by changing the `.font_size` attribute of the current theme ![image](https://user-images.githubusercontent.com/25161821/223431591-7c6cedf2-3e1d-48dd-bb69-f433e0f1b4f1.png) ## Type of change <!-- Please delete options that are not relevant. --> - [x] New feature (non-breaking change which adds functionality) # How has this been tested? <!-- Please describe the tests that you ran to verify your changes. --> - [x] all tests pass with my change - [x] I check if my changes works with both PySide and PyQt backends as there are small differences between the two Qt bindings. Co-authored-by: Daniel Althviz Moré <d.althviz10@uniandes.edu.co> Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes/Closes
Bugfix part of PR #5607
Description
Fixes issues with high resolution screens when using PySide2 as Qt binding since the logic to set High DPI attributes was only covering PyQt5.
As a note, for Qt6 bindings these attributes are deprecated since they are applied by default and there is no way to deactivated them. In the other hand, there is still a needed for those attributes when using Qt5 bindings since there they are deactivated by default.
References
See https://doc.qt.io/qtforpython-6/gettingstarted/porting_from2.html#class-function-deprecations
Type of change
How has this been tested?
as there are small differences between the two Qt bindings.
Final checklist: