AdiBags

AdiBags

8M Downloads

Bag width doesn't change

voyvoy opened this issue ยท 7 comments

commented

On one of my characters the bag witdh doesn't change no matter what options I chose. I re-installed several different AdiBags versions, disabled all other addons, cleaned everything there is to clean - to no effect. The only explanation I could come up with so far is that it's somehow related to the kind of bags my character is using: Grummlepack, Embersilk Bag, Tattered Hexcloth Bag and Illusionary Bag. I know it's far fetched, but I'm really out of ideas what could cause this (especially since on all other characters the resizing works) and constantly having a bag as wide as possible interferes with other windows (bank, auction house etc.).

You can see the empty space on the right side of the bag. No matter, how many items per columns I chose, there is always a lot of space left as the window doesn't resize:

adibags

commented

No error message.

commented

Any error message ?

commented

I can't reproduce this. Any luck with 1.8.1 ?

commented

Still the same, unfortunately. It changes in height, but not in width. I can't even offer more guesses at a possible source, since it's the same behaviour no matter, if I have other addons active or not, so it doesn't seem to be a conflict of sorts. And other options such as graphics or interface are shared on all characters. There comes no reason to my mind why this character is singled out when AdiBags works perfectly fine on all others.

Sorry I can't be more helpful in pinpointing the problem's source.

commented

Yes! Currency frame was the culprit. The moment I disabled it, the bag went to a normal size. Having currencies split into rows might be a good solution to this. Thanks!

commented

Have you tried disabling some of those currencies? The currency frame seems to be added after the regular bag layout is done, and just forces the bag frame to be wide enough to accommodate it.

Fixing that seems more of a design issue than a bug fix (options would I guess either be to re-layout the bag after determining the width of the currency frame, or split the currency into multiple lines).

I did spot what I think is a bug while looking at the currency frame sizing code, though - line 171 of CurrencyFrame.lua, in the call to widget:SetSize():
fs:GetStringWidth() + 4 * #values,

I'm not sure what was intended there (possibly there's meant to be some padding between elements, and the bug is that it isn't being added?), but what it's actually doing is just making the amount of padding on the right of the currency frame increase by 4px (or whatever unit it takes) for every currency that's enabled, making the currency frame width issue worse, as a fairly large chunk of the added width is just useless empty space. Commenting out the * #values leaves you with a currency frame just big enough to contain the enabled currencies.

commented

@arhra: thanks, will update. I think at some point there was an issue with :GetStringWidth() when the strings was containing textures. It might have been fixed at some point without me noticing it.

And this might actually be causing voyvoy's issue.