-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix unusable legend size with long filenames on Mac #2264
Conversation
This also allows floating legend width which could cause #1337 to recur with very strange screen geometries, but this appears to fix it in a majority of cases.
I added text-wrapping and a floating legend width; these combine to make this a fairly robust fix for #1337. Unfortunately some plot geometries still have the issue but they are largely when the plot is tiny. Making the legend fixed- and full-width by using |
Miguel's suggestion is good, I would go even further - have names with ellipsis by default but expand them fully when the cursor hovers over the legend (or on click?). |
I'll point out that this PR really was intended to have a quite narrow scope: the point of #1337 and thus this PR was to fix a font scaling issue that has made sasview 5 unusable on macs with certain hard-to-define, but fairly common monitor configurations for the last 3.5 years because the plot legends look like this: So I would suggest that building a real solution for arbitrary length filename display is a larger-scale problem that shouldn't necessarily block merging this patch PR for a longstanding issue that critically impacts usability. that said, With the expand-on-hover / expand-on-click solution it becomes (a) tedious to hover/click each item, (b) difficult to save a plot with a complete legend for further re-use in another context. I can see having 3 config parameters to let users really control this behavior: FITTING_PLOT_FULL_WIDTH_LEGENDS default False, if True invokes the Is this too many config parameters to add? or about the right level of flexibility? |
Moving the preference panel GUI to a different branch/PR as it depends on updated tooling from @krzywon |
This should now be ready for final review if tests pass. |
As described in #1337; the fix from @krzywon both works on Mac and dramatically simplifies the legend code. I'll test on Windows shortly.