Browse Source

Fixed background of text field as table cell editor.

pull/109/head
weisj 5 years ago
parent
commit
bda0232475
  1. 4
      core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextUI.java

4
core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextUI.java

@ -23,6 +23,7 @@
*/ */
package com.github.weisj.darklaf.ui.text; package com.github.weisj.darklaf.ui.text;
import com.github.weisj.darklaf.ui.table.DarkTableCellBorder;
import com.github.weisj.darklaf.util.DarkSwingUtil; import com.github.weisj.darklaf.util.DarkSwingUtil;
import com.github.weisj.darklaf.util.DarkUIUtil; import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.GraphicsContext; import com.github.weisj.darklaf.util.GraphicsContext;
@ -145,6 +146,9 @@ public abstract class DarkTextUI extends BasicTextUI implements PropertyChangeLi
Border border = editor.getBorder(); Border border = editor.getBorder();
if (border instanceof DarkTextBorder) { if (border instanceof DarkTextBorder) {
paintBorderBackground((Graphics2D) g, editor); paintBorderBackground((Graphics2D) g, editor);
} else if (border instanceof DarkTableCellBorder) {
g.setColor(editor.getBackground());
g.fillRect(0, 0, editor.getWidth(), editor.getHeight());
} else if (border != null) { } else if (border != null) {
Insets ins = border.getBorderInsets(editor); Insets ins = border.getBorderInsets(editor);
if (ins != null) { if (ins != null) {

Loading…
Cancel
Save