Skip to content
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

[FIX] Canvas: Palette propagation #2760

Merged
merged 11 commits into from
Dec 22, 2017

Conversation

ales-erjavec
Copy link
Contributor

@ales-erjavec ales-erjavec commented Nov 9, 2017

Issue

Canvas conflicts with dark theme/styles, e.g:

screen shot 2017-11-09 at 17 51 11

Description of changes
  • Propagate the palette in the canvas where applicable
  • Use palette's colors instead of hardcoded ones
  • Add an option to specify --style=fusion:breeze-dark (the palette's colors are taken from KDE's t 'Breeze Dark' theme). This is mostly just for testing, the fusion style is not a good with dark color themes
  • Suppress the default 'orange' styling in the main window if the application palette is to dark.

If deemed necessary a GUI option in the preferences dialog can also be added to select the style.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link

codecov-io commented Nov 9, 2017

Codecov Report

Merging #2760 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2760   +/-   ##
=======================================
  Coverage   81.67%   81.67%           
=======================================
  Files         323      323           
  Lines       55420    55420           
=======================================
  Hits        45264    45264           
  Misses      10156    10156

@kernc
Copy link
Contributor

kernc commented Nov 9, 2017

❤️

Any possibility to also support QT_STYLE_OVERRIDE env variable?

@ales-erjavec
Copy link
Contributor Author

What do you mean? QT_STYLE_OVERRIDE works the same as always.

@kernc
Copy link
Contributor

kernc commented Nov 9, 2017

Hmm, I set QT_STYLE_OVERRIDE, which works great for other Qt5 (non-Python) apps (qBittorrent, Clementine, VirtualBox), but doesn't seem to work with Orange.

$ env | grep QT_STYLE                                                                                                                                                                                                                               
QT_STYLE_OVERRIDE=adwaita-dark

I guess it's got to do with paths and the virtualenv I have PyQt5 in.

@ales-erjavec
Copy link
Contributor Author

Do you have PyQt5 installed from wheels?

Try using the system provided PyQt5. I.e. use --system-site-packages when creating the env or just symlink /usr/lib/python3/dist-packages/{sip.*so,PyQt5} into the created env

@ales-erjavec ales-erjavec force-pushed the canvas/palette-propagation branch 2 times, most recently from 751c275 to bcb07f6 Compare November 15, 2017 09:22
@kernc
Copy link
Contributor

kernc commented Dec 10, 2017

That did the trick. Looks quite good. Except the icons, perhaps, aren't best suited to dark themes.

screenshot_2017-12-10_04-13-50

@lanzagar lanzagar added this to the 3.9 milestone Dec 22, 2017
@lanzagar lanzagar merged commit 0f452d9 into biolab:master Dec 22, 2017
@ales-erjavec ales-erjavec deleted the canvas/palette-propagation branch December 22, 2017 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants