Skip to content

Commit 18a279f

Browse files
hansonrhansonr
authored andcommitted
corrects disabled background color in AWT
1 parent 083d258 commit 18a279f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSTextUI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public abstract class JSTextUI extends JSLightweightUI {// implements {ViewFacto
130130
protected static final EditorKit defaultKit = new DefaultEditorKit();
131131

132132
static final Point markDot = new Point();
133-
133+
134134
transient JTextComponent editor;
135135
protected boolean editable = true;
136136
protected RootView rootView = new RootView();
@@ -293,7 +293,7 @@ protected void setColors(String prefix) {
293293
if ((dfg == null) || (dfg instanceof UIResource)) {
294294
editor.setDisabledTextColor(UIManager.getColor(prefix + ".inactiveForeground"));
295295
}
296-
dfg = UIManager.getColor(prefix + ".inactiveBackground");
296+
dfg = UIManager.getColor(editor.秘isAWT() ? "control" : prefix + ".inactiveBackground");
297297
if (dfg != null)
298298
inactiveBackground = dfg;
299299

0 commit comments

Comments
 (0)