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/03/30 17:52:46 UTC

[GitHub] [netbeans] DevCharly commented on a change in pull request #2048: [NETBEANS-3787] FlatLaf: fixed active tab painting if project tab colors enabled

DevCharly commented on a change in pull request #2048: [NETBEANS-3787] FlatLaf: fixed active tab painting if project tab colors enabled
URL: https://github.com/apache/netbeans/pull/2048#discussion_r400382442
 
 

 ##########
 File path: platform/core.multitabs/src/org/netbeans/core/multitabs/impl/ProjectColorTabDecorator.java
 ##########
 @@ -161,8 +161,16 @@ public void paintAfter( TabData tab, Graphics g, Rectangle tabRect, boolean isSe
         }
         g.setColor( c );
         Rectangle rect = new Rectangle( tabRect );
-        rect.y += rect.height - 3;
-        rect.grow( -1, -1 );
+        int underlineHeight = UIManager.getInt("nb.multitabs.underlineHeight"); // NOI18N
 
 Review comment:
   `{scaledInteger}` means that FlatLaf scales this value (when initializing the Laf) using the FlatLaf user scale factor, which is used for Java 8 but also on Linux. When running in Java 9 the FlatLaf user scale factor is usually 1.
   
   In other places I usually invoke method `UIScale.scale( intValue )`, but in this case it would require that Multi-tabs project depends on FlatLaf library project, which I wanted to avoid.
   
   The downside of using `{scaledInteger}` is that it is not updated when the user changes scaling in Windows Settings.

----------------------------------------------------------------
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