Closed FireFragment closed 11 months ago
@FireFragment thank you very much for your report. That's true at the moment a visual focus state for the StandardListView
is missing.
Behavior regarding to the design specifications:
On fluent on a focused ListView
the first item got a focus border. The border can be moved down by array down and up by arrow down. To change selection you have to press enter on the focused ListView
.
There is no dedicated visual representation of a focused ListView
. Behavior on a focused ListView
is arrow down, selects the next item, arrow up selects previous item.
On material ListView
does not have a focus state, instead by press tab
the next item in the list is focused. On enter the item got selected.
I would like to implement the fluent focus behavior for all styles to have a common behavior. But I have one problem if the ListView
got focus the focus should be set on the first item and the ListView
should scroll to it if it is not visible. But for this I need to detect when the ListView
got focus, for this I would need something like a on-got-focus
event / callback or a property change handler for has-focus
#112.
Focused
StandardListView
is indistinguishable from an unfocused one, making it impossible to tell, whether a list is focused. This happens with all three styles (fluent, material, and native).Video
Here is a video of how the code below behaves:
https://github.com/slint-ui/slint/assets/55660550/1e83a75f-7fc0-40b0-8fe2-e78b43b5f246
To reproduce
Launch the following code and repeatedly press the TAB key. You can see, that buttons and checkbox are highlighted correctly when focused, while the list is not.
Launch on SlintPad
Platform: KDE, Linux, X11