Skip to content

Brain GUI modernization (Phase 1)#14054

Open
payamsash wants to merge 2 commits into
mne-tools:mainfrom
payamsash:enh/brain-colorbar-help-dialog
Open

Brain GUI modernization (Phase 1)#14054
payamsash wants to merge 2 commits into
mne-tools:mainfrom
payamsash:enh/brain-colorbar-help-dialog

Conversation

@payamsash

@payamsash payamsash commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Reference issue (if any)

Phase 1 of #14042.

What does this implement/fix?

  • colorbar tick labels in the Brain GUI now automatically switch to scientific notation however it's overridable.

  • more space adde between the colorbar and its tick labels

  • Removed title from the colorbar (looked ugly)

  • Help dialog switched from matplotlib-based to Qt dialog.

  • The "Press ? for help" message is now clickable

  • small documentation fix for background parameter in Brain class

  • tests added for the new features

Additional information

Claude wrote _auto_scalar_bar_fmt and _pairs_to_html functions, but I reviewed them.

@payamsash

Copy link
Copy Markdown
Contributor Author

before:
Screenshot 2026-07-14 at 09 51 22

after:
Screenshot 2026-07-14 at 09 52 17

@wmvanvliet

Copy link
Copy Markdown
Contributor

I love the new help dialog! Much better than the matplotlib one and as a bonus the ugly help button that overlapped the toolbar is gone 🎉 But what did you base it's look and feel on? Our mne-qt-browser also has a QT-based help dialog and it looks like this (on linux):

image

Would it make sense to have both dialogs use the same style?

I don't know why you think the colorbar title looks ugly and has to go? It's a very obscure feature to begin with.
What I would really love, more than more spacing and non-bold tick labels, is tick marks, little horizontal lines indicating the exact point to which the number in the label refers.

To my knowledge, the brain plotter already did scientific notation, and it syncs up with the min / mid / max label just above the color bar sliders:

image

why did you have to change it?

@payamsash

Copy link
Copy Markdown
Contributor Author

I think it makes sense to have aligned Help dialogs, tnx ... I will modify it.
when we have long title (overlay key) the colorbar title goes out of the window, but maybe we can do sth here. wdyt? @wmvanvliet
By scientific notation I mean the decimals (see the example), especially when we have too large or too small values (I guess for example with MNE inv method) it creates values with different decimal precisions.

+1 for lines in colorbar (I will include it in the next PR)

Screenshot 2026-07-14 at 13 13 23

@wmvanvliet

Copy link
Copy Markdown
Contributor

ah you mean the scientific notation now trigger earlier than it otherwise would? Because I agree that screenshot you posted is not exactly optimal. Note that it is correct though: always three significant digits. But aesthetically unpleasing.

@payamsash

Copy link
Copy Markdown
Contributor Author

sorry, not really a good example, what I mean is that each tick independently took its own format before, so colorbar could be mixture of different formats, but now _auto_scalar_bar_fmt looks at the whole range and decides what fmt to choose.
before:

Screenshot 2026-07-14 at 15 39 31

after:

Screenshot 2026-07-14 at 15 40 12

@wmvanvliet

Copy link
Copy Markdown
Contributor

That is indeed much better 👍

@larsoner

Copy link
Copy Markdown
Member

@wmvanvliet you have been working on GUIs a lot lately, happy to let you and @payamsash work out most of this. But feel free to ping me if you need another set of eyes or opinion!

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