-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add ability to resize widget.Slider #5343
Comments
Additional context: I'm using a HBoxLayout in the control bar container |
Hi. Thanks for opening this issue. However, I'm afraid that this just isn't how you are supposed to handle widget sizes in Fyne. It is the parent container, and its layout function, that controls the size of its children. Unless using a The problem here is that your HBox is collapsing objects to their minimum horizontal space and stacking them next to each other that way. You need to find another suitable layout. I added HPortion to With that said though, I wonder if we perhaps should consider making the MinSize of sliders slightly larger? They are not quite usable at their squashed size. |
I agree with making the Slider MinSize slightly larger. But in the meantime @pneumaticdeath the quickest way to achieve what you want I think is to extend the slider widget (see the docs for extending widgets) to override the MinSize function to increase the Width slightly. |
I'd call that a hack and not quite a solution. The main problem here is, in my opinion, the wrong layout being used. Making the minimum size larger is an improvement but not the fix to the issue. |
Checklist
Is your feature request related to a problem?
I'm working on a project (a Conway's Game of Life simulator) that uses a slider, and it renders too small by default. i've tried forcing it to be larger, but haven't had any luck. Ideally there would be a SetMinSize(Size) method on some widgets. See screenshot below.
Is it possible to construct a solution with the existing API?
I have not discovered one. I am pretty new to Fyne, so it's possible I've overlooked it.
Describe the solution you'd like to see.
My code looks something like:
Ideally I'd like to be able to say
The text was updated successfully, but these errors were encountered: