spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.29k stars 1.61k forks source link

Selected figure thumbnail in Plots not highlighted in dark mode #10255

Closed Khalilsqu closed 5 years ago

Khalilsqu commented 5 years ago

In the dark mode when scrolling through the figures it is not very clear which is the currently shown figure, Whereas in the light mode there is a blue boundary surrounding the selected figure.

Drak Mode dark_plot

Light Mode light_plot

Is it possible to make a similar boundary with probably a different color than blue for Dark theme to clarify what is the currently displayed figure? and possibly also make the thickness of the boundary line higher

Dependencies

cloudpickle >=0.5.0          :  1.2.2 (OK)
pygments >=2.0               :  2.4.2 (OK)
qtconsole >=4.5.5            :  4.5.5 (OK)
nbconvert >=4.0              :  5.6.0 (OK)
sphinx >=0.6.6               :  2.2.0 (OK)
pylint >=0.25                :  2.3.1 (OK)
psutil >=0.3                 :  5.6.3 (OK)
qtawesome >=0.5.7            :  0.6.0 (OK)
qtpy >=1.5.0                 :  1.9.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
zmq >=17                     :  18.1.0 (OK)
chardet >=2.0.0              :  3.0.4 (OK)
numpydoc >=0.6.0             :  0.9.1 (OK)
spyder_kernels >=1.5.0;<2.0.0:  1.5.0 (OK)
qdarkstyle >=2.7             :  2.7 (OK)
atomicwrites >=1.2.0         :  1.3.0 (OK)
diff_match_patch >=20181111  :  20181111 (OK)
watchdog                     :  None (OK)
keyring                      :  None (OK)
pexpect >=4.4.0              :  4.7.0 (OK)
pympler                      :  None (OK)
sympy >=0.7.3                :  None (NOK)
cython >=0.21                :  None (NOK)
IPython >=4.0                :  7.8.0 (OK)
matplotlib >=2.0.0           :  3.1.1 (OK)
pandas >=0.13.1              :  None (NOK)
numpy >=1.7                  :  1.15.4 (OK)
scipy >=0.17.0               :  None (NOK)
pyls >=0.28.2;<0.29.0        :  0.28.3 (OK)
rtree >=0.8.3                :  0.8.3 (OK)
goanpeca commented 5 years ago

Thoughts @jnsebgosselin ?

Khalilsqu commented 5 years ago

Not sure wither you agree on these changes. image

light_plot2

black_plot2

But maybe there is a better way to get a different color (e.g. red) rather than hard coding it.

ccordoba12 commented 5 years ago

Not sure wither you agree on these changes.

Thanks a lot @Khalilsqu for taking a look at this one! I think they are fine, so please create a PR for them.

jnsebgosselin commented 5 years ago

I think we should try to use a color and thickness defined by the theme, if it is possible, instead of using hard coded values specific for the plots plugin.

Khalilsqu commented 5 years ago

I have no idea how to use the theme to get different colors.

There are only two colors returned from colorname = self.canvas.palette().highlight().color().name() when I tried some different syntax themes.

Dark Mode automatic spyder/dark #1464a0 automatic emacs #1464a0 automatic inkpot #1464a0 automatic monokai #1464a0 automatic nightlion #1464a0 automatic oblivion #1464a0 automatic oblivion #1464a0 automatic obsidian #1464a0 automatic pastel #1464a0 automatic zenburn #1464a0

Light Mode automatic spyder #0078d7 automatic idle #0078d7 automatic minimal #0078d7 automatic notepad++ #0078d7 automatic pydev #0078d7 automatic roboticket #0078d7 automatic scintilla #0078d7

image

As you can see the color #1464a0 is quite close to the spyder default dark mode/theme background color and thus not clearly visible on highlighted thumbnails.

jnsebgosselin commented 5 years ago

Ah yeah you are right... it won't be easy to get the value used by the dark theme because those are hard coded in the theme and I'm not sure they are available... Ok then, let's go with the if darkstyle route.

@goanpeca do you want the color used saved somewhere else, because I think you are trying to gather them in a same place?

ccordoba12 commented 5 years ago

I think you are trying to gather them in a same place?

I think that's not possible right now, but in the link below you can find the colors used for selections in QDarkstyle:

https://github.com/ColinDuquesnoy/QDarkStyleSheet/blob/master/qdarkstyle/palette.py

goanpeca commented 5 years ago

Indeed until we release a newer version of QDarkStyle, we have to "hardcode" them