mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 07:17:13 -06:00
Label: fixed disabled foreground
This commit is contained in:
@@ -16,9 +16,13 @@
|
|||||||
|
|
||||||
package com.formdev.flatlaf.ui;
|
package com.formdev.flatlaf.ui;
|
||||||
|
|
||||||
|
import java.awt.Graphics;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.UIManager;
|
||||||
import javax.swing.plaf.ComponentUI;
|
import javax.swing.plaf.ComponentUI;
|
||||||
import javax.swing.plaf.basic.BasicLabelUI;
|
import javax.swing.plaf.basic.BasicLabelUI;
|
||||||
|
import sun.swing.SwingUtilities2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides the Flat LaF UI delegate for {@link javax.swing.JLabel}.
|
* Provides the Flat LaF UI delegate for {@link javax.swing.JLabel}.
|
||||||
@@ -35,4 +39,11 @@ public class FlatLabelUI
|
|||||||
instance = new FlatLabelUI();
|
instance = new FlatLabelUI();
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void paintDisabledText( JLabel l, Graphics g, String s, int textX, int textY ) {
|
||||||
|
int mnemIndex = l.getDisplayedMnemonicIndex();
|
||||||
|
g.setColor( UIManager.getColor( "Label.disabledForeground" ) );
|
||||||
|
SwingUtilities2.drawStringUnderlineCharAt( l, g, s, mnemIndex, textX, textY );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,3 +18,8 @@
|
|||||||
|
|
||||||
*.background=3c3f41
|
*.background=3c3f41
|
||||||
*.foreground=bbbbbb
|
*.foreground=bbbbbb
|
||||||
|
|
||||||
|
|
||||||
|
#---- Label ----
|
||||||
|
|
||||||
|
Label.disabledForeground=808080
|
||||||
|
|||||||
@@ -18,3 +18,8 @@
|
|||||||
|
|
||||||
*.background=f2f2f2
|
*.background=f2f2f2
|
||||||
*.foreground=000000
|
*.foreground=000000
|
||||||
|
|
||||||
|
|
||||||
|
#---- Label ----
|
||||||
|
|
||||||
|
Label.disabledForeground=777777
|
||||||
|
|||||||
@@ -18,3 +18,8 @@
|
|||||||
|
|
||||||
*.background=ccffcc
|
*.background=ccffcc
|
||||||
*.foreground=ff0000
|
*.foreground=ff0000
|
||||||
|
|
||||||
|
|
||||||
|
#---- Label ----
|
||||||
|
|
||||||
|
Label.disabledForeground=000088
|
||||||
|
|||||||
Reference in New Issue
Block a user