I would like to create a switch control #3579
Replies: 4 comments 5 replies
-
The rounded rectangle is in already so you can use it from the |
Beta Was this translation helpful? Give feedback.
-
I personally think that there definitely is a place for it. Right now I am using either two radio buttons or a select with two items and neither seems like a perfect fit. As for reasons to it not being included, I am not aware of anything specific. It is likely best to follow https://m2.material.io/components/switches for design and usage. It sure about how square ones would fit in. It might make sense to first include it into https://github.com/fyne-io/fyne-x first and then bring it into regular fyne when it stabilises. |
Beta Was this translation helpful? Give feedback.
-
Screencast from 01-19-2023 06:27:19 PM.webm Hi all, I will definitly need support from you on some topic, and i hope we will make this as good as it needs to be. ps > i would need to know what would be best combination of colors for (switched, disabled and not switched) also i made rounded rectangle sizes as following : |
Beta Was this translation helpful? Give feedback.
-
Hi, i cloned the develop branch of the fyne, and there i basically copied the check.go control, and last few days i was playing with it. So my plan was to take this and add it to the fyne-x controlls, for further testing & additions. What is for me issue is that, for this to work, i cant use internal widget packet (which i assume is intended) that is used by the check control. But then i saw something So what would be the most correct/easy way to do this ? Since Check widget does 90% of what i need, is it possible to extend Check widget and then just rewrite the render method, or i need to extend fyne.BaseWidget and then move on from there ? Which existing widget would be good example of this ? |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I was playing around these days with fyne, and i did not found Switch anywhere, so i am planing to work on this control.
I think most of the work is flashed out with the checkbox control, i would just need to do the rendering differently.
Would this be good addition to fyne, or is there a reason that fyne does not have this ?
I would like to do either switch like in a photo i linked, or square one, (perhaps option for both)
looking that this will also come soon it would be perfect place to put it in place.
If you do think this is good idea, what things should i pay attention to ?
Beta Was this translation helpful? Give feedback.
All reactions