On Fri, 13 Jun 2025 00:58:03 GMT, Michael Strauß <mstra...@openjdk.org> wrote:

>> Have DialogPanes and Alerts been considered for use with HeaderBar & 
>> StageStyle.EXTENDED? 
>> 
>> I.e., re: Alerts, cater for **hiding** minimise / maximise icons by default, 
>> but still showing the close (X) icon. 
>> 
>> Seems to me that StageStyle.EXTENDED implies all three icons must be shown, 
>> and if any other configuration is required, it involes hiding everything (by 
>> setting height to 0) and creating your own button(s). Which, if all you want 
>> is the close button, there's no simple way to create _that_. Or is there?
>> 
>> Shouldn't this be made much simpler for the dev? Even if they need to manage 
>> their own buttons for these standard utility-style popups (which isn't a 
>> great experience given it's currently handled for us by default), can't we 
>> provide a way to instantiate the window icons as nodes?
>> 
>> Maybe I am missing something.
>> 
>> Also, in general, maybe some documentation on how to use HeaderBar for 
>> DialogPanes. E.g., I assume you'd need to dialogPane.setHeader(headerBar) on 
>> each and every dialog.
>
>> Have DialogPanes and Alerts been considered for use with HeaderBar & 
>> StageStyle.EXTENDED?
> 
> I haven't spent much time thinking about this yet.
> 
>> I.e., re: Alerts, cater for **hiding** minimise / maximise icons by default, 
>> but still showing the close (X) icon.
>> 
>> Seems to me that StageStyle.EXTENDED implies all three icons must be shown, 
>> and if any other configuration is required, it involes hiding everything (by 
>> setting height to 0) and creating your own button(s). Which, if all you want 
>> is the close button, there's no simple way to create _that_. Or is there?
> 
> Not yet. In an earlier iteration of this feature, there was an 
> `EXTENDED_UTILITY` stage style, which gave you a utility-style extended 
> window with a close button only (which I think is exactly what you're 
> asking). This didn't make it into the final feature, because it would 
> essentially be a combination of two existing styles (`EXTENDED` and 
> `UTILITY`). I think before adding other styles, we should first discuss 
> whether this is the right direction in the first place.
> 
> Rather than adding those combinatorial styles, I would rather 
> remove/deprecate `UTILITY` and `TRANSPARENT`, so that you can essentially 
> choose between three fundamental stage styles: `DECORATED`, `UNDECORATED`, 
> and `EXTENDED`. Then you could add utility-ness and transparent-ness as 
> independent attributes with a new `Stage.initUtility(boolean)` and 
> `Stage.initTransparent(boolean)` API.
> 
>> Shouldn't this be made much simpler for the dev? Even if they need to manage 
>> their own buttons for these standard utility-style popups (which isn't a 
>> great experience given it's currently handled for us by default), can't we 
>> provide a way to instantiate the window icons as nodes?
>> 
>> Maybe I am missing something.
>> 
>> Also, in general, maybe some documentation on how to use HeaderBar for 
>> DialogPanes. E.g., I assume you'd need to dialogPane.setHeader(headerBar) on 
>> each and every dialog.
> 
> Yes, I agree that this should be much simpler. This would be a good 
> enhancement for the future.

finally in!  good job @mstr2 !

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

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

Reply via email to