-
-
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: Make the width of thumbnails scrollbar resizable #9720
PR: Make the width of thumbnails scrollbar resizable #9720
Conversation
This is not ready for review yet @goanpeca, there is something I still need to figure out with the dark style. |
Ok @goanpeca, I've added some workaround to handle some padding and margin values that are hard coded in the qdarkstyle. I haven't been able to get rid or figure out exactly where the extra 2px * 2 comes from in the dark style... if you can find a better solution, I'm all hears. |
Will take a look |
cd05c7f
to
6912b88
Compare
It is a good point, but in that case, since I do not really know where this padding comes from, I don't know how useful that would be. It is just a thought, but I don't understand why there is a need to have hardcoded margin and padding in qdarkstyle, in addition to the default one. I mean, if an application is tailored to use qdarkstyle and qdarkstyle only, there is no problem, but in a scenario where we have to support multiple styles, this makes things a lot more complicated... |
And @goanpeca thanks for the review btw! |
@jnsebgosselin I am fie with this PR how it is :-), anything extra you wanted to do? |
Yes, if the third option listed in #9747 is selected , I would like to implement it here. |
Reimplement scrollbar show/hide behavior
@goanpeca, I dismissed your review to not merge this one by accident. |
Awesome, I will answer them later tonight and thank you. |
Thanks for working on this 😄 |
@jnsebgosselin on OSX there are the following issues:
|
Thanks you very much for the tests.
The plots plugin generates the image from the data it receives from the console. The images look pixelated because the pngs sent by the console have a low resolution. There is not much that can be done here, I mean from the plot viewer perspective. Does changing the resolution of the inline backend helps in the console preferences?
Ok, I do not see another solution than to increase the hard-coded padding in |
Let me push a PR so we gte the right value for OSX :-)
Yes, this is for another PR (I think I tried this before and I got bigger images... but still pixelated) |
Ok thanks. Is this cropped in the light theme also or only in the dark one? |
@jnsebgosselin there must be something missing on the space calculation for OSX, the fixed 10 value, seems to work as expected and for now I think it is good enough 🤷♂ ?
It was the same on both themes, dark and light! Let me know what you think! |
Ok thank you @goanpeca for your help with this. I think it is good enough for now. I really don't know where these extra padding come from... The question now, before we can finish this, is to know whether the same problem also appears in Linux... |
I tested on Linux and buttons are not cropped there, so this is only a macOS problem. @jnsebgosselin, please address @goanpeca's last comments so we can merge this one because I think it's almost ready. Thanks! |
Co-Authored-By: Gonzalo Peña-Castellanos <goanpeca@gmail.com>
Co-Authored-By: Gonzalo Peña-Castellanos <goanpeca@gmail.com>
@goanpeca I think this should be true for the inline plots in the IPython console, but is it also the case for the plots plugin? |
@jnsebgosselin, we need to tell the inline backend to generate retina display plots (there's an option for that in IPython). However, that's a tricky business now because users can move Spyder or the IPython console window (if detached) to a HiDPI monitor from a low resolution one and vice-versa. So we have to detect when the window is moved to another monitor and its screen resolution to tell all kernels when to turn on/off retina display plots automatically. |
@jnsebgosselin, for next time please add all code change suggestions to the batch and apply them as a single commit. Thanks! |
This is done from the GitHub interface? OK I will do that next time, thanks for the tip. |
Yeah, there's a button in each suggestion called |
Ok, but the plots plugin doesn't work exactly like the IPython console because it allow for the figures to be resized. So I thought that increasing the dpi of the inline figures would increase the quality of the images and thumbnails shown in the plots plugin and offer a temporary solution to this problem. |
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.
Thanks a lot for this @jnsebgosselin! Pretty nice addition!
Awesome! thanks @jnsebgosselin :-) |
Yeah, thanks a lot for your generous patience and help with this. This has proven to be more tricky than I anticipated... |
Issue(s) Resolved
Fixes item 2 of #9367
Fixes #9747
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: Jean-Sébastien Gosselin