Skip to content
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

Long menu items cause very wide menus #58

Closed
smlx opened this issue Apr 27, 2016 · 2 comments
Closed

Long menu items cause very wide menus #58

smlx opened this issue Apr 27, 2016 · 2 comments

Comments

@smlx
Copy link

smlx commented Apr 27, 2016

Bug reported here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761053

As described in the title, having a source/sink/stream with a very long description causes the width of the menu to become too large (i.e. larger than the screen).

You can reproduce this issue by adding a null sink with a very long description:

$ pactl load-module module-null-sink sink_name=ANYNAME sink_properties=device.description="<insert a long string here>"

Now open up the pasystray sink menu.

And remove the sink again via:

$ pactl unload-module module-null-sink

I guess pasystray should have a maximum menu size (possibly related to detected screen size)?

Thanks!

@christophgysin
Copy link
Owner

The maximum size should probably be a lot smaller than the screen size. If the sink/source/output/input names are longer than N chars we should cut the end and replace it with the ellipsis character (…).

What would be an acceptable value for N? N=80?

@smlx
Copy link
Author

smlx commented Apr 27, 2016

80 sounds reasonable to me (I guess until someone comes along with a lower resolution screen :P)

You already have the tooltip/popup showing full details on the item, so eliding characters after 80 in the menu should still allow disambiguation (in the case that the first 80 characters are the same between multiple sinks).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants