RFR: 8089913: CSS pseudo classes missing by default for some controls
mstr2
github.com+43553916+mstr2 at openjdk.java.net
Fri Mar 5 16:08:40 UTC 2021
On Fri, 5 Mar 2021 13:31:38 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Thanks for the additional fixes. I'll change the title of the JBS bug to "CSS pseudo classes missing by default for some controls". Can you change the PR title to match?
>>
>> The changes to `ListView` and `TableView` look correct to me.
>>
>> In looking more closely, I'm not sure the changes to `TreeCell` or `TreeTableRow` are correct. When a `TreeCell` or `TreeTableRow` is constructed, the item is null. Unless I'm missing something, it looks like a cell/row with a null item shouldn't have a pseudo-class state set.
>
>> The changes to ListView and TableView look correct to me.
>
> And also `TreeTableView`.
I guess that depends on whether a `TreeCell` or `TreeTableRow` that is not expanded should be considered collapsed.
Unless there are compelling reasons to have cells that are neither expanded nor collapsed, I think it is sensible to default to treating non-existing items as collapsed.
Currently, once `:expanded` or `:collapsed` has been set, it will not be removed even if the item is set to `null`. This should probably be changed to either:
1. remove any pseudoclass when the item is set to `null`, or
2. set the `:collapsed` pseudoclass and remove the `:expanded` pseudoclass when the item is set to null.
-------------
PR: https://git.openjdk.java.net/jfx/pull/413
More information about the openjfx-dev
mailing list