You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/01/05 16:40:52 UTC

[GitHub] [netbeans] DevCharly commented on a change in pull request #1846: [NETBEANS-3428] FlatLaf: fixes for form designer

DevCharly commented on a change in pull request #1846: [NETBEANS-3428] FlatLaf: fixes for form designer
URL: https://github.com/apache/netbeans/pull/1846#discussion_r363104102
 
 

 ##########
 File path: java/form/src/org/netbeans/modules/form/FormLoaderSettings.java
 ##########
 @@ -472,12 +472,13 @@ public void setPaletteInToolBar(boolean value) {
      * @return background color of the designer.
      */
     public java.awt.Color getFormDesignerBackgroundColor() {
-        Color defaultBackground = UIManager.getColor( "Tree.background" ); //NOI18N
-        if( null == defaultBackground )
+        Color defaultBackground = UIManager.getColor("nb.formdesigner.designer.background"); //NOI18N
+        if (defaultBackground == null)
+            defaultBackground = UIManager.getColor("Tree.background"); //NOI18N
+        if (defaultBackground == null)
 
 Review comment:
   As far as I know the form designer always uses the IDE LAF.
   But it is possible to preview the form with other LAFs in new window. (right-click on panel: "Preview Design > LAF")
   
   > In that case, should the background color not be taken from the LAF rather than from a special constant?
   
   No sure what you mean. `UIManager.getColor()` gets the color from the LAF (if set).
   
   `Tree.background` was probably used because it is white, while `Panel.background` is gray.
   BTW `nb.formdesigner.designer.background` is currently not used. I've added it for completeness.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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