-
-
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
PR: Add an option to set a custom HiDPI scale factor #4454
PR: Add an option to set a custom HiDPI scale factor #4454
Conversation
@ccordoba12 @rlaverde why dont use a single option + a QDoubleSpinBox? The default entry would be 1.0, why do we need an extra entry???? Also I would change to Also the QDoubleSpinBox might return floats all the time? |
Using a QDoubleSpinBox won't be necessary to backport the changes, but it won't allow configuration for multiple screens. And I think that the differentiation between auto-scaling and custom-scalling is necessary (3 options) |
Ok, please backport the corresponding changes. They don't seem too disruptive, so we can have them in 3.2. |
Done 😄 |
spyder/config/main.py
Outdated
'high_dpi_scaling': False, | ||
'high_dpi_custom_scale_factor': False, | ||
'high_dpi_custom_scale_factors': '2;', |
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 put here a float number, e.g. 1.5 or 2.5, so that people understand that they can adjust the scale factor to anything they want.
Also remove the ;
at the end (which doesn't make sense for a single screen).
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.
A float number could cause glitches, as said in the second question of this blog
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.
Yeah, but that's something for users to try. The point is showing them that setting float factors is a possibility (and users on issue #4316 already made use of that possibility).
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, is the colon really necessary? I'd prefer to remove it.
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 changed it for "2.5", the ";" was necessary before backporting the changes
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, great!! Then 2.5
(without colon) it is :-)
spyder/plugins/configdialog.py
Outdated
tip=_("Set this for high DPI displays")) | ||
|
||
custom_scaling_radio = self.create_radiobutton( | ||
_("Set a custom 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.
This tooltip needs to be more descriptive, i.e. we need to explain here that users can introduce non-integer scale factors and that they can also set factors for different screens, separated by colons.
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.
We should also add a link to Qt documentation that explains this, like http://doc.qt.io/qt-5/highdpi.html
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 don't know how to do that in a tooltip ;-)
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 put the link in a label
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.
Nice, thanks!!
I don't see here any adjustment for the contents of the Help plugin. @rlaverde, is that necessary or not? |
I added more information of how to set this settings.
I forget about this, I'll try to do it, but I don't know how to test it |
Just set a custom scale factor and verify that the text in the Help plugin also scales. If not, you'll have to search for a solution on the web. |
1c1dd88
to
92c833f
Compare
@rlaverde, please ping me if/when you solve the problem with Help. |
@ccordoba12 I'm testing and that seems to be an issue with I tested with a minimal QWebEngineView and It doesn't scale |
What if we try to scale things using CSS or something like that? |
Maybe that will work, generate a CSS based in |
Yes, exactly! |
@ccordoba12 I think I found the error with Help plugin, font was being assigned sending a |
Nice!! Could you post a new screenshot with a custom scale factor? Also, changing screen resolution requires a restart, so please be sure to demand a restart for the newly introduced options here. |
I will be test this in the afternoon, going out now. |
Ok, things look really good so far. The only thing missing is requiring a restart, and that would be it :-) |
Done, although I don't find a easy way to manage the preferences as a group, and set the restart for each preference. |
I'll leave @goanpeca the final word for this one. |
This reverts commit f053593.
Remove exported QT_SCREEN_SCALE_FACTORS when option is False.
Fix alignation error in mac.
ed92f34
to
ef8b639
Compare
Fixes: #4316
This is working, but It'll fail when setting variables that could be interpreted as int or floats (
2
,2.5
but not2;
,2.5;
)It'll be necessary to backport some changes from master (introduced by the multiple edgeline configuration)