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/29 22:32:17 UTC

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

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

 ##########
 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
+        if( underlineHeight > 0 ) {
+            // if the selected tab is highlighted with an "underline" (e.g. in FlatLaf)
+            // then paint the project color bar at the top of the tab
+            rect.height = underlineHeight;
 
 Review comment:
   If an underline is used to indicate the active tab, why not just keep the whole tab colored, like the other tabs, with the underline added? E.g.
   
   rect.height - =underlineHeight?

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