Skip to content

Allow style sheets to be used #175

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

Merged
merged 4 commits into from
Jun 21, 2023
Merged

Conversation

dstansby
Copy link
Member

@dstansby dstansby commented Jun 19, 2023

This is a minimum viable implementation for using Matplotlb style sheets. Currently light and dark style sheets are hardcoded (taken from #157), instead of being generated from the napari theme. I think this is a better approach, as even though it's less general, I doubt the napari folks will be changing their theme very often so manually updating our theme when they do is a reasonable ask.

This doesn't deal with whether we should look for user style sheets, but does let the users set the style sheet property with a path to their own style sheet. We can follow this PR up with a PR to add a location where users can put a custom style sheet.

This still needs:

@dstansby dstansby marked this pull request as ready for review June 20, 2023 08:26
@dstansby dstansby requested a review from samcunliffe June 20, 2023 08:27
Copy link
Collaborator

@samcunliffe samcunliffe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍉🍉 I like this very much. I'm particularly pleased that you took the stuff I started and made it good/work.

  • Do we want to add something to the docs to explain how to add a custom stylesheet by setting the widget.mpl_style_sheet_path?

@samcunliffe
Copy link
Collaborator

samcunliffe commented Jun 20, 2023

Just for my sanity: #160 which is passing here is sufficient.

@samcunliffe
Copy link
Collaborator

Let's close #156 and #157 as this supersedes them.

We can follow this PR up with a PR to add a location where users can put a custom style sheet.

We might want to steal the idea from #156 to use a special theme installed in the user's mpl config dir? How do you feel about that?

@samcunliffe samcunliffe added this pull request to the merge queue Jun 21, 2023
Merged via the queue into matplotlib:main with commit 1f05e06 Jun 21, 2023
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.

2 participants