On Mon, 28 Oct 2024 19:52:05 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

> I would have preferred to have the pref height to be set to a special 
> constant,

I tried to do that, but it doesn't work: `Region.minHeight(double)` 
special-cases exactly two constants, `USE_COMPUTED_SIZE` and `USE_PREF_SIZE`. 
The method is also final, so I can't override it in `HeaderBar`. Any other 
special constant (i.e. a value < -1.0) will be ignored by this method.

One possible solution would be to add some kind of hackery to `Region` that 
would allow `HeaderBar` to change the behavior of `minWidth(double)`, but that 
seems extremely intrusive.

> but setting minHeight works too ...
> 
> ... except it does not:

The macOS implementation for extended windows uses 
`NSWindowToolbarStyleUnifiedCompact`, which is a bit taller than the classic 
style. As of late, macOS seems to be trending towards unified windows with 
large title bars (I'm using macOS terminology here, not referring to 
`StageStyle.UNIFIED`). The unified-compact style seems to be a good compromise 
between classic title bars and huge unified title bars.

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

PR Comment: https://git.openjdk.org/jfx/pull/1605#issuecomment-2442527810

Reply via email to