-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add option to set/unset dpi scaling for screens that are not high resolution #3551
Conversation
…ion and the icons appear bigger
#============================================================================== | ||
from spyder.config.main import CONF | ||
if CONF.get('main', 'high_dpi_scaling'): | ||
has_high_dpi_scaling=True |
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.
Please name this variable as high_dpi_scaling
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True) | ||
|
||
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling, has_high_dpi_scaling) | ||
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.
Remove this blank addition :-)
@@ -1171,7 +1177,7 @@ def add_xydoc(text, pathlist): | |||
for child in self.menuBar().children(): | |||
if isinstance(child, QMenu) and child != self.help_menu: | |||
child.setTearOffEnabled(True) | |||
|
|||
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.
Also remove this blank
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.
@mariacamilaremolinagutierrez, you forgot to remove this blank :-)
Great job!! This is exactly what I've done to fix this issue ;-) I left some minor (and very simple) comments to solve :-) |
@mariacamilaremolinagutierrez, please address my comments as soon as possible. I want to include this in 3.0.2 :-) |
@@ -261,6 +266,7 @@ def __init__(self, options=None): | |||
|
|||
qapp = QApplication.instance() | |||
if PYQT5: | |||
# Enabling scpaling for high dpi |
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.
Typo scaling vs. scpaling
@@ -261,6 +266,7 @@ def __init__(self, options=None): | |||
|
|||
qapp = QApplication.instance() | |||
if PYQT5: | |||
# Enabling scpaling for high dpi | |||
qapp.setAttribute(Qt.AA_UseHighDpiPixmaps) |
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.
@ccordoba12 should we also affect this setting with the new option that was added, or it is really not needed?
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.
I think the critical one is HighDpiScaling
. No one has reported problems about this one :-)
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.
ok
@mariacamilaremolinagutierrez we normally work on forks of the repo, not on the repo itself. https://github.com/spyder-ide/spyder/wiki/Dev%3A-Github-Workflow#Developers |
@goanpeca Hi Gonzalo, yes I knew about this after. I apologize, for the next one I'll fork the repo :) |
if CONF.get('main', 'high_dpi_scaling'): | ||
high_dpi_scaling=True | ||
else: | ||
high_dpi_scaling=False |
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.
@mariacamilaremolinagutierrez, please add spaces around equals, like this
high_dpi_scaling = True
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.
ciocheck coming soon to the rescue!
@mariacamilaremolinagutierrez, please address my latest comments so I can merge this one :-) |
I don't understand why only that change make a test fail. I'm working on another issue, but as soon as I finish it I'll figure this out. I don't fully understand the tests it is failing, but they are:
|
Thanks @mariacamilaremolinagutierrez! Merging now :-) |
@mariacamilaremolinagutierrez In case you haven't figured it out yet: |
Thank you for the explanation @jitseniesen :) |
Fixes #3489