-
-
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 option in List to hide separators #3756
Comments
In this case we don't have to worry as the child widgets will override the behaviour in the List (as child interaction always has preference over parent). Focus is a little more problematic as the implementation is a little closed in its current setup. I think this leaves the separator request only. To be consistent with the general hide/show should we go |
Yeah I like |
Wanted to revisit this discussion to talk about what disabling focus could look like, API-wise, for the collection widgets. @Jacalz and I discussed adding selection to the GridWrap widget in fyne-x to prep for moving it into Fyne. If selection is added, however, I will have to maintain a fork of the widget to keep using it in my project (as I already do with List) because I need builtin focusability of the items to be disabled. |
Ah, that is indeed particularly problematic because implementing an interface such as Focusable is done at compile time and a runtime switch can't disable it. |
How do disableable widgets like button reject the focus when they are disabled? Maybe a similar strategy could be used? |
The focus manager understands the Disabled interface and avoids focusing those widgets. |
Just updating to clarify that a hide separators option is the only thing that needs to be added, API-wise. Everything else can be achieved by extending widget.List and making it Disableable and disabled. |
On develop for 2.5.0 |
Checklist
Is your feature request related to a problem?
The List widget has a lot of nice builtins but if the developer wants a non-interactive list (eg to display a log file as recently discussed in the discord), or if the row widgets themselves handle interactivity, then it is not really suitable to use the existing List without forking it to comment out builtin behavior.
Is it possible to construct a solution with the existing API?
No response
Describe the solution you'd like to see.
The
List
widget should have new publicly exported flags:Or perhaps DisableSelection should disable rows being focusable and hoverable as well, and in that case be named DisableInteractivity?
Also, maybe instead of DisableSelection, have a new enum SelectionMode once multi-select is actually implemented:
The text was updated successfully, but these errors were encountered: