Page MenuHomePhabricator

Spacer Gadget does better job locking in contents on either side
Closed, ResolvedPublic


This is probably a wishlist, but hopefully an easy one? :-) The new spacer gadget is really close to solving my problem. Unfortunately, it doesn't seem too smart about changing size - that is, when contents on either side of it change size, the spacer isn't quite as effective. As example, I am able to achieve my perfect bryce setup here:

But, if I open several of my favorite EFL apps, my clock gets shifted to the side (where I'd expect the left spacer to take that in to consideration and get smaller, allowing the location of my clock to remain in tact. Here's a SS with the apps open; it's pretty distracting when the gadgets move around as I open/close apps.

abrouwers created this task.Sep 2 2017, 6:36 AM
zmike added a comment.Sep 5 2017, 11:55 AM

I'm not really sure this is sensible for the spacer gadget. You have an example case there with two spacers, but where would the limit be? What if someone has 5 gadgets and 6 spacers on a bar and expects the gadgets to all stay in the same position?

I can't think of a way to do this that doesn't make the code impossibly complex.

As a note, the way bryce works with regards to sizing/scrolling... unlike shelf, each gadget doesn't handle scrolling. the bryce as a whole scrolls. This is better for a lot of reasons -- but this is also the reason that bryce doesn't allow absolute positioning. Because the whole bryce is designed to expand without gadgets meeting limits.

Ok, thanks for the explanation. Feel free to close if too complex, I guess bryces just don't work for my setup.

zmike added a comment.Sep 7 2017, 7:57 AM

It's possible that in the future I might come up with a way to resolve this, but what it really sounds like you want is to be able to center-align gadgets?

That's correct - my preferred setup is a full length bar, with menu, pager, launcher on the left, clock centered, and some system gadgets (battery, wireless, mixer) all the way on the right

I had an idea for this over the weekend and did a test implementation in this branch. It seems to do layouts fairly consistently and (I think) is an overall improvement when adding multiple spacers. If you could test and report that would be helpful.

Apologies for the delay, but I'm away from my E laptop for a few days! I'll give a fresh master checkout a shot, and report back if it DOESN'T work! Thanks for the update.