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/03 14:32:17 UTC

[GitHub] [netbeans] DevCharly commented on a change in pull request #1839: [NETBEANS-3428] FlatLaf: new close, left, right, drop-down and maximi…

DevCharly commented on a change in pull request #1839: [NETBEANS-3428] FlatLaf: new close, left, right, drop-down and maximi…
URL: https://github.com/apache/netbeans/pull/1839#discussion_r362828376
 
 

 ##########
 File path: platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/ui/FlatTabControlIcon.java
 ##########
 @@ -130,6 +131,21 @@ protected void paintIcon(Component c, Graphics2D g, int width, int height, doubl
         Color bgColor = new Color(0, 0, 0, 0); // Alpha zero means no background.
         Color fgColor = foreground;
         {
+            int buttonState = this.buttonState;
+            if (buttonState == -1) {
+                // get button state from component
+                if (!c.isEnabled()) {
+                    buttonState = TabControlButton.STATE_DISABLED;
 
 Review comment:
   Yes, this works. The reason is that class `FlatTabControlIcon` is not an instance of `javax.swing.ImageIcon`. So `LookAndFeel.getDisabledIcon()` returns `null` and the normal icon is used.

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