DWilliames / paddy-sketch-plugin

Automated padding, spacing and alignment for your Sketch layers
MIT License
2.17k stars 61 forks source link

Button with icon at front or back / Different behaviour for two text colors #125

Open steffisuss opened 6 years ago

steffisuss commented 6 years ago

Sketch 51.1 Paddy 1.0.7


Hi there,

I´ve got a special case for buttons here.

What I would like to create is a button system where I can • add icons before or after the label text • change the button state - and therefore in my case change the text color for one color combination

Everything works fine except one text color for button “Icon after text“. I can only imagine it has something to do with the order of text layers (the text layers are not symbols, just text layers) in my symbol - but then it should also be the case for the button "icon before text", doesn't make any sense to me right now.

I’ve tried a lot (creating a group out of the two text layers, changing alignment, do a combination of auto and paddy plugin...) and nothing is working - maybe anyone has an idea how to fix this. I would like to avoid creating a special case in the library here.

Thanks a lot for any ideas!

Steffi


Bug report

Expected behavior:

For label text within button "icon after text": button width should resize as for button "icon before text"

Actual behavior:

For label text within button "icon after text": button width is not resizing correctly

sreenshot

Steps to reproduce:

Button-Test.zip

blaskotron commented 5 years ago

Looks like all of these have an issue with Paddy 2 when I tried and you're on Paddy 1.

I use 2 and made it work for something similar by having the icon in the background nested symbol, and the instance of that has paddy applied in the parent symbol.

This prevents sketch's built in automatic symbol movement when next to text.

Button with Icon.sketch.zip