smeerten / ssnake

A program for the analysis of NMR data.
Other
20 stars 15 forks source link

Show full name in tooltip if shortened #143

Closed Famlam closed 1 year ago

Famlam commented 1 year ago

If you have two names which are identical in the first 20 characters, you will not be able to distinguish (for example) the following two names in Multiplot mode: H1_600_specialsample_beforeheating H1_600_specialsample_afterheating

This PR adds the full name as a tooltip of the shortened name, so that by hovering your mouse you can still observe which spectrum corresponds to which name image

wfranssen commented 1 year ago

Nice change! Any reason to take 20 characters as a cutoff? I think it might depend on the OS or window settings how many characters are displayed by default. Perhaps always giving the popup would be an option? Or do you think that will be annoying for the user?

Famlam commented 1 year ago

@wfranssen I unfortunately don't know why a 20 char cutoff was chosen, but this was already a hardcoded value in ssNake. All I did was adding a tooltip if abbreviated and adding ... to any abbreviated names. I guess it is the size of 20×m that just fits in the available space. Not how I typically name my spectra though ;)

Perhaps always giving the popup would be an option? Or do you think that will be annoying for the user?

Personally I wouldn't expect a tooltip if this tooltip doesn't contain additional info (i.e. if name is not shortened, displayed text == tooltip text), but I think that's a matter of preference. More than happy to add the tooltips in that case too if you prefer?

wfranssen commented 1 year ago

Ah yes, now I see. I probably set the max number to 20 to avoid a too wide side panel. Then your PR is fine. Thanks.