DevCharly commented on code in PR #6391:
URL: https://github.com/apache/netbeans/pull/6391#discussion_r1314226221
##########
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Installer.java:
##########
@@ -62,4 +67,20 @@ public void validate() throws IllegalStateException {
System.setProperty( "flatlaf.updateUIOnSystemFontChange", "false" );
}
+ public static class Listerner implements PropertyChangeListener {
Review Comment:
No need to have a new class for this. Simply add a `private void
uiPropertyChange(PropertyChangeEvent pce)` method to class `Installer` and add
listener with `UIManager.addPropertyChangeListener(this::uiPropertyChange);`
##########
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLafOptionsPanelController.java:
##########
@@ -76,8 +78,21 @@ public void applyChanges() {
FlatLFCustoms.updateUnifiedBackground();
if (oldUseWindowDecorations !=
FlatLafPrefs.isUseWindowDecorations()) {
Review Comment:
Introduce a variable for `FlatLafPrefs.isUseWindowDecorations()` because it
is used 5 times in this block.
##########
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Installer.java:
##########
@@ -62,4 +67,20 @@ public void validate() throws IllegalStateException {
System.setProperty( "flatlaf.updateUIOnSystemFontChange", "false" );
}
+ public static class Listerner implements PropertyChangeListener {
+
+ @Override
+ public void propertyChange(PropertyChangeEvent pce) {
+ if ("lookAndFeel".equals(pce.getPropertyName())) { //NOI18N
+ if
(FlatLaf.class.isAssignableFrom(UIManager.getLookAndFeel().getClass())
Review Comment:
Why not use `UIManager.getLookAndFeel() instanceof FlatLaf`? Would be easier
to read.
--
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