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

WIP, ENH: Button to change the background color #9000

Conversation

GuillaumeFavelier
Copy link
Contributor

This PR adds a color picker in the tool bar. It's still work in progress.

output.mp4

ToDo:

  • Update matplotlib canvas too
  • Add notebook support
  • test/coverage

It's an item of #7162

@GuillaumeFavelier GuillaumeFavelier self-assigned this Mar 5, 2021
@GuillaumeFavelier
Copy link
Contributor Author

You might be interested @hoechenberger since you suggested the idea :)

@hoechenberger
Copy link
Member

Awesome, I'd totally forgotten I'm slightly creative sometimes! 😅 will play with it ASAP!!!!

@GuillaumeFavelier GuillaumeFavelier mentioned this pull request Mar 5, 2021
86 tasks
@hoechenberger
Copy link
Member

hoechenberger commented Mar 5, 2021

@GuillaumeFavelier It's great!

But it's actually much more than what I'd actually meant to propose 😅

See, my idea was to have a button which would essentially toggle between a "light" and a "dark" background – with the hope that, at some time in the future, the button press could switch the entire GUI theme between light and dark.

The color picker is a great idea, but I think it's over-engineered for my use case, and won't play as nicely with the idea to add a GUI theme switching functionality. See what I mean..?

What do others think?

@GuillaumeFavelier
Copy link
Contributor Author

Whoops, I misunderstood then. I can close if it's not needed 👍

@GuillaumeFavelier
Copy link
Contributor Author

The light/dark theme is on the todo list, I'll link your comment to have the details :)

@hoechenberger
Copy link
Member

Sorry about this 😕

@larsoner
Copy link
Member

larsoner commented Mar 5, 2021

@hoechenberger if you want to get a start on the light/dark theme, I would look into:

  1. Look up how light/dark theme of the OS can be detected by Qt (probably some standard, platform-independent command nowadays?)
  2. Look how to switch Qt between two themes (probably via stylesheets?)

This is probably a common issue nowadays so some googling + quick changes might get us most of the way there. I don't think we need to get it working on all OSes and both Qt/notebook at once, even if it just works on macOS+Qt it's a good start.

FWIW I don't think we will want to change the background color of the render window based on the theme, just the controls. Otherwise the screenshots/images people produce will differ across machines, which is not good.

@larsoner larsoner closed this Mar 5, 2021
@GuillaumeFavelier GuillaumeFavelier deleted the enh/background_color branch March 5, 2021 22:02
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.

3 participants