I want to achieve a rectangle shape, about Size(width, height*0.8).
oUF only sets a square size by default: SetSize(size, size) instead of 2 separate values. Which means I had to used this code in PostCreateIcon.
Code:
button:SetSize(cfg.buSize, cfg.buSize*cfg.buHeightMulti)
This obviously works fine, but will override any aura size settings for any .buff, .debuff or .aura. And that's actually what bothers me, because I would like to maintain a little control over sizes. At the very least one size for party/raid and one size for everything else.
Now I tried to copy paste the PostCreateIcon function, name it PostCreateIconRaid and use this for party/raid. But this wasn't working as expected, maybe because it was some issue with oUF at this point (has been a while since I tried).
Anyway, what I'm interested in:
Is there a cleaner/smarter solution than copy and pasting the whole PostCreateIcon function? The function contains a lot more code and just to change ONE single line seems quite stupid. Besides of that it might cause issues - as I mentioned above (even though I might have done it just wrong after all) - when using two PostCreateIcon functions at once.