From c65ac20bb1b75ebd6f96f846fcb20e4e0df09934 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 14 Apr 2023 14:35:28 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-92161=20=E5=8F=8D=E8=89=B2=E9=97=AE?= =?UTF-8?q?=E9=A2=98,=E6=8A=8A=E9=80=89=E4=B8=AD=E5=8F=98=E8=89=B2?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91=E6=8F=90=E5=87=BA,=E5=92=8CsetIcon?= =?UTF-8?q?=E5=88=86=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/controlpane/JListControlPane.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java index 37134ec99..4e1ce9c61 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java @@ -377,15 +377,15 @@ public abstract class JListControlPane extends JControlPane implements ListContr this.textLabel.setText(nameable.getName()); boolean iconSet = false; for (NameableCreator creator : JListControlPane.this.creators()) { + if(isSelected) { + this.textLabel.setBackground(selectedBgColor); + this.textLabel.setForeground(Color.WHITE); + } else { + this.textLabel.setBackground(Color.WHITE); + this.textLabel.setForeground(Color.BLACK); + } if (creator.menuIcon() != null && creator.acceptObject2Populate(nameable) != null) { this.iconLabel.setIcon(creator.menuIcon()); - if(isSelected) { - this.textLabel.setBackground(selectedBgColor); - this.textLabel.setForeground(Color.WHITE); - } else { - this.textLabel.setBackground(Color.WHITE); - this.textLabel.setForeground(Color.BLACK); - } this.setToolTipText(creator.createTooltip()); iconSet = true; break;