pec1985 / TiSMSView

Expandable Text Area Module - iOS - Titanium
Other
60 stars 18 forks source link

buttonTitle should resize text to fit #4

Closed sindresorhus closed 13 years ago

sindresorhus commented 13 years ago

If the button title gets to long, it now truncates the text. For example "lipsum" becomes "li...um". It should instead resize the text to fit.

pec1985 commented 13 years ago

This is done like this for a reason, like the real SMS app, the textfield needs to have some room. If the text field is allowed to shrink to fit the button size, there could be a possibility that the actual text field area will be too small and give a bad user experience. But if you feel the need to, go ahead and change the code, I'm not going to change it in this project.

sindresorhus commented 13 years ago

I think you misunderstood. I'm not talking about changing the textArea.

What I'm asking if you could make the "send" button text shrink in size when to long, instead of truncating?

pec1985 commented 13 years ago

Oh, I see, that makes more se sense. Let me see what I can do.

sindresorhus commented 13 years ago

You probably want to look at adjustsFontSizeToFitWidth

sindresorhus commented 13 years ago

This needs a couple of more tweaks.

send button

Like you can see from the example app, the text does not align to the center vertically. This should be fixed. It should also have a padding on the left and the right side, some pixels, so that it doesn't fill out to the edge.

Can you do that?

Tested with commit 78eb297f0181c4f212d788e2f70b40657e8c8cdb

pec1985 commented 13 years ago

Will not fix right now, the title of the button should be something short, if you need it to be longer, modify the source code for your needs.

sindresorhus commented 13 years ago

@pec1985 Ok, but at least keep it open, so it's not forgotten, and others may want to submit a pull request for it.