eirikbakke commented on code in PR #6391:
URL: https://github.com/apache/netbeans/pull/6391#discussion_r1325598335


##########
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Installer.java:
##########
@@ -62,4 +67,17 @@ public void validate() throws IllegalStateException {
         System.setProperty( "flatlaf.updateUIOnSystemFontChange", "false" );
     }
 
+    private void uiPropertyChange(PropertyChangeEvent pce) {
+        if ("lookAndFeel".equals(pce.getPropertyName())) { //NOI18N
+            if (UIManager.getLookAndFeel() instanceof FlatLaf
+                    && FlatLafPrefs.isUseWindowDecorations()
+                    && SystemInfo.isLinux) {
+
+                JFrame.setDefaultLookAndFeelDecorated(true);
+                JDialog.setDefaultLookAndFeelDecorated(true);

Review Comment:
   OK. Is the Installer the best place to put the 
setDefaultLookAndFeelDecorated calls? Are we guaranteed to get a 
PropertyChangeEvent when the LAF is initially set?
   
   A possibly cleaner alternative would be to add a dedicated 
windowDefaultLookAndFeelDecorated property that can be returned from 
LFCustoms.createApplicationSpecificKeysAndValues, and which then triggers the 
call to JFrame/JDialog.setDefaultLookAndFeelDecorated from 
o.n.swing.plaf.Startup.installLFCustoms. (I'd only bother with this if others 
think it's a good idea.)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to