Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Too narrow; #841

Closed
Ccmi opened this issue Aug 23, 2017 · 12 comments
Closed

Switch Too narrow; #841

Ccmi opened this issue Aug 23, 2017 · 12 comments

Comments

@Ccmi
Copy link

Ccmi commented Aug 23, 2017

No description provided.

@daniel-jonathan
Copy link
Member

You will need to describe more than this please.

@Ccmi
Copy link
Author

Ccmi commented Aug 23, 2017

Set the size to medium or large,width too narrow;
image

@daniel-jonathan
Copy link
Member

hmmm... okay, I will take a look. Thanks.

@theolof
Copy link

theolof commented Aug 25, 2017

The width for .small is also smaller than intended

This is my Switch:

theSwitch = Switch(state: .off, style: .light, size: .small)
theCell.layout(theSwitch).right(16).top(16).bottom(16)

which leads to
screen shot 2017-08-25 at 08 53 22
This is the Switch from https://github.com/CosmicMind/Material#switch
screen shot 2017-08-25 at 08 53 06

@OrkhanAlikhanov
Copy link
Contributor

As a workaround you can subclass it and return custom intrinsicContentSize.

@daniel-jonathan
Copy link
Member

I am not sure if this is an issue or just an incorrect use of the Switch control. If there is an issue here to solve, please reopen this. Thank you!

@aemgtz
Copy link

aemgtz commented Oct 23, 2017

I can confirm that this is an issue. As you can see @theolof comment.
I face the same problem that the switch is too short for all swith size.

@daniel-jonathan
Copy link
Member

I see, okay I have reopened the issue and will run the sample project and see what's up. Thanks for the feedback :)

@Recouse
Copy link

Recouse commented Feb 3, 2018

Has this already fixed?

@daniel-jonathan
Copy link
Member

daniel-jonathan commented Feb 7, 2018

Can someone test this commit, who has been facing this issue: 4433996, thank you!

@Recouse
Copy link

Recouse commented Feb 8, 2018

It's better now.
screen shot 2018-02-08 at 08 15 49

@daniel-jonathan
Copy link
Member

Cool, so unless there is further need to adjust the sizing, I am going to close this issue and the next release will include this fix. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants