On Thu, 24 Apr 2025 15:01:24 GMT, Markus Mack <mm...@openjdk.org> wrote:

>> I agree when it actually makes a semantic difference. For example, there's a 
>> difference between setting `Node.opacity` to zero, and setting 
>> `Node.visible` to `false`. In the first case, the node will still receive 
>> events, while in the second case it won't. But what's the semantic 
>> difference between non-existing header buttons, and header buttons with zero 
>> height?
>> 
>> One argument against setting `prefButtonHeight` to zero could be that it 
>> special-cases one specific value (or two, because there's also the special 
>> value `USE_DEFAULT_SIZE`). In general, the property only describes a 
>> _preferred_ height, which the toolkit is free to honor (in any way it sees 
>> fit) or to ignore entirely. However, the two special values 0 and 
>> `USE_DEFAULT_SIZE` are specified to be honored by all toolkits in all cases.
>
> Typically it's issues related to keyboard navigation that forget to handle 
> the zero-size case. But I agree it's ok to leave it as it is because it's 
> documented in a way that can be trusted.

That's true, but in this specific case, header buttons are not 
focus-traversable or visible to accessibility APIs (unlike regular buttons in 
the scene graph).

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1605#discussion_r2058683097

Reply via email to