mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-27 03:46:17 -06:00
Label: fixed disabled foreground
This commit is contained in:
@@ -16,9 +16,13 @@
|
||||
|
||||
package com.formdev.flatlaf.ui;
|
||||
|
||||
import java.awt.Graphics;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicLabelUI;
|
||||
import sun.swing.SwingUtilities2;
|
||||
|
||||
/**
|
||||
* Provides the Flat LaF UI delegate for {@link javax.swing.JLabel}.
|
||||
@@ -35,4 +39,11 @@ public class FlatLabelUI
|
||||
instance = new FlatLabelUI();
|
||||
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
|
||||
*.foreground=bbbbbb
|
||||
|
||||
|
||||
#---- Label ----
|
||||
|
||||
Label.disabledForeground=808080
|
||||
|
||||
@@ -18,3 +18,8 @@
|
||||
|
||||
*.background=f2f2f2
|
||||
*.foreground=000000
|
||||
|
||||
|
||||
#---- Label ----
|
||||
|
||||
Label.disabledForeground=777777
|
||||
|
||||
@@ -18,3 +18,8 @@
|
||||
|
||||
*.background=ccffcc
|
||||
*.foreground=ff0000
|
||||
|
||||
|
||||
#---- Label ----
|
||||
|
||||
Label.disabledForeground=000088
|
||||
|
||||
Reference in New Issue
Block a user