From dcdbd2ac61b22ebae997972f4bf9c0e2b906d291 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 14 Apr 2023 14:45:36 +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 4e1ce9c617..93cdc4e4e2 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 @@ -376,14 +376,14 @@ public abstract class JListControlPane extends JControlPane implements ListContr Nameable nameable = element.wrapper; this.textLabel.setText(nameable.getName()); boolean iconSet = false; + if(isSelected) { + this.textLabel.setBackground(selectedBgColor); + this.textLabel.setForeground(Color.WHITE); + } else { + this.textLabel.setBackground(Color.WHITE); + this.textLabel.setForeground(Color.BLACK); + } 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()); this.setToolTipText(creator.createTooltip());