Skip to content

Add some explanation text to top of widgets #139

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 1 commit into from
Jun 1, 2023

Conversation

dstansby
Copy link
Member

@dstansby dstansby commented May 31, 2023

This PR adds some text to the top of widgets explaining how many layers it takes as input. I'm hoping this improves user experience somewhat.

Screenshot 2023-06-01 at 09 59 14

The name of the widget should probably have some title styling applied to it - @samcunliffe can you advise on the best way to do this? If you don't know off the top of your head I can look into it.

Fixes #27

@samcunliffe
Copy link
Collaborator

samcunliffe commented May 31, 2023

@samcunliffe can you advise on the best way to do this? If you don't know off the top of your head I can look into it.

Off the top of my head: not, I'm afraid. I can tell you button sizes in the CSS or colours. Text formatting is advanced stuff. From a quick cmd-F search of the CSS it looks like you could try and use <h1> inside the QLabel, or put it in a QCustomTitleBar (or something similar) and it should just work™️.


Worth noting that Napari already tells you the widget name (albeit quite faintly)

Screenshot 2023-05-31 at 18 24 48

@samcunliffe
Copy link
Collaborator

samcunliffe commented May 31, 2023

🚀 Almost fixes

Do you know how to do my wishlist for that? (Make the help hints disappear when the user has selected the required number of layers.)

That said, a static QLabel is simpler (and therefore probably better).

@dstansby
Copy link
Member Author

dstansby commented Jun 1, 2023

To keep this simple (partly because there's already the widget name as you pointed out), I've updated it to just add the text for how many layers need selecting.

@dstansby dstansby marked this pull request as ready for review June 1, 2023 09:00
@dstansby dstansby requested review from samcunliffe and ruaridhg June 1, 2023 09:00
@samcunliffe samcunliffe enabled auto-merge June 1, 2023 09:09
@samcunliffe samcunliffe added this pull request to the merge queue Jun 1, 2023
@samcunliffe samcunliffe linked an issue Jun 1, 2023 that may be closed by this pull request
Merged via the queue into matplotlib:main with commit e742e3b Jun 1, 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.

Add contextual GUI hints on using widgets
2 participants