<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
@font-face
{font-family:"Iosevka Fixed SS16";
panose-1:2 0 5 9 3 0 0 0 0 4;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:10.0pt;
font-family:"Aptos",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Iosevka Fixed SS16";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">- Right-click system menu: you are right, we probably should not add an API to control the system menu. However, it might make sense to have the HeaderBar show the system
menu on Windows by default, unless the </span><span style="font-family:"Iosevka Fixed SS16";color:black;background:#D4D4D4">onContextMenuRequestedProperty</span><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""> is set. What do you think? Shouldn't
the HeaderBar mimic the native behavior?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">- HeaderBar height: so you explicitly do not want USE_NATIVE_HEIGHT = -5.0; constant (or something like that)?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">But generally speaking, I think the method to achieve the same height as the native title bar should be described both in the JEP and the docs.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Also, and I might be wrong here - would this code stop working after the binding gets collected, unless you keep the reference to the created double binding:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">headerBar.minHeightProperty().bind(<br>
Bindings.createDoubleBinding(</span><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">-andy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">openjfx-dev <openjfx-dev-retn@openjdk.org> on behalf of Michael Strauß <michaelstrau2@gmail.com><br>
<b>Date: </b>Friday, October 25, 2024 at 09:46<br>
<b>To: </b><br>
<b>Cc: </b>openjfx-dev <openjfx-dev@openjdk.org><br>
<b>Subject: </b>Re: JEP: JavaFX controls in the title bar<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">> - Right-click system menu: is there any way to provide this functionality somehow? May be as a method in the HeaderBar?<br>
<br>
This is probably more a question of whether we want to have this, not<br>
of whether it is possible. The right-click system menu is a<br>
Windows-only thing, it's not available on macOS and Linux.<br>
As the name implies, the system menu is very system-dependent. Do we<br>
want to add a system-dependent menu to a cross-platform framework?<br>
If applications want to have a HeaderBar context menu, they can easily<br>
add their own JavaFX ContextMenu.<br>
Let's suppose we add the default system menu only on Windows. Then if<br>
an application adds its own ContextMenu to HeaderBar, we would<br>
probably expect the JavaFX ContextMenu to replace the default system<br>
menu?<br>
<br>
<br>
<br>
> Could you please add these two columns to the table, even if they contain N/A.<br>
<br>
Done.<br>
<br>
> - left/rightSystemInsets: thank you, you probably want to clarify that in these properties' javadoc.<br>
<br>
Done.<br>
<br>
<br>
<br>
> - HeaderBar height: my question was what should the application developers do in order to make the height of the bar to be the same as the native one? Maybe there should be a constant similar to Region.USE_COMPUTED_SIZE to accomplish that?<br>
<br>
We could change the layout algorithm such that HeaderBar.minHeight is<br>
ignored when it is less than the height of the system insets. However,<br>
that would restrict the flexibility of application developers<br>
(HeaderBar is resizable, after all).<br>
Another option is that application developers could do something like this:<br>
<br>
headerBar.minHeightProperty().bind(<br>
Bindings.createDoubleBinding(<br>
() -> Math.max(headerBar.getLeftSystemInset().getHeight(),<br>
headerBar.getRightSystemInset().getHeight()),<br>
headerBar.leftSystemInsetProperty(),<br>
headerBar.rightSystemInsetProperty()));<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>