Skip to content

MAINT: Play nicer with themes#12483

Merged
cbrnr merged 2 commits intomne-tools:mainfrom
larsoner:theme2
Mar 6, 2024
Merged

MAINT: Play nicer with themes#12483
cbrnr merged 2 commits intomne-tools:mainfrom
larsoner:theme2

Conversation

@larsoner
Copy link
Copy Markdown
Member

@larsoner larsoner commented Mar 5, 2024

See mne-tools/mne-qt-browser#233 (comment), but in short:

  1. Setting the global QIcon.setThemeSearchPaths to only our path is not compatible with other bits of software like mne-qt-browser and MNELAB

  2. Instead, prepend our path

  3. When calling QIcon.fromTheme, ask for the correct icon name but also provide a fallback in case the user has switched to a theme name that does not provide the correct icons. In MNE-Qt-browser and MNE we provide support for "light" and "dark" and I checked to make sure these work concurrently (they seem to at least!)

    image

@cbrnr feel free to see if this helps with MNELAB

@larsoner larsoner requested a review from agramfort as a code owner March 5, 2024 14:48
@drammock
Copy link
Copy Markdown
Member

drammock commented Mar 5, 2024

LGTM but I'll wait to merge until @cbrnr has a chance to look

@cbrnr
Copy link
Copy Markdown
Contributor

cbrnr commented Mar 5, 2024

Like I said in the other PR, I can test this in a couple of days. Thanks a lot for working on this!

@cbrnr
Copy link
Copy Markdown
Contributor

cbrnr commented Mar 6, 2024

Thanks @larsoner!

snwnde pushed a commit to snwnde/mne-python that referenced this pull request Mar 20, 2024
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