From 2882415a331d2b9cb200b7981e3d2c573a123378 Mon Sep 17 00:00:00 2001 From: renekton Date: Fri, 9 Aug 2024 19:48:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0buttonUI=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=92=8C=E7=82=B9=E5=87=BB=E8=83=8C=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fine/theme/utils/FineUIStyle.java | 1 + .../java/com/fr/design/gui/frpane/FineBreadcrumbPane.java | 8 +++++++- .../com/fine/theme/light/ui/laf/FineLightLaf.properties | 6 ++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java b/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java index d2b64bea31..e85aff674a 100644 --- a/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java +++ b/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java @@ -42,6 +42,7 @@ public interface FineUIStyle { String PURE_LIST = "pureList"; String PURE_TREE = "pureTree"; String PASTEL_BUTTON = "pastelButton"; + String BREADCRUMB_BUTTON = "breadcrumbButton"; /** diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/FineBreadcrumbPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/FineBreadcrumbPane.java index a633f7111c..f95a699510 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/FineBreadcrumbPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/FineBreadcrumbPane.java @@ -81,6 +81,8 @@ public class FineBreadcrumbPane extends Row { int size = files.size(); currentCrumb = new BreadcrumbButton<>(getRootdata((T) files.get(size-1)), files.get(size-1)); add(currentCrumb); + currentCrumb.setSelected(true); + currentCrumb.setForeground(FineUIUtils.getUIColor("Button.breadcrumbSelectedForeground", "Button.breadcrumbSelectedForeground")); final int index = getComponentCount(); addBreadcrumbListener(currentCrumb, index, backListener); for (int i = size-2; i >= 0; i--) { @@ -274,7 +276,7 @@ public class FineBreadcrumbPane extends Row { BreadcrumbButton.this.content = content; setMargin(new Insets(0, 0, 0, 0)); setBorder(BorderFactory.createEmptyBorder()); - FineUIStyle.setStyle(BreadcrumbButton.this, FineUIStyle.PLAIN_BUTTON); + FineUIStyle.setStyle(BreadcrumbButton.this, FineUIStyle.BREADCRUMB_BUTTON); setBorderPainted(false); setOpaque(false); } @@ -297,6 +299,10 @@ public class FineBreadcrumbPane extends Row { } } + /** + * 节点点击关联动作监听器 + * @param + */ public interface BreadcrumbBackListener { void onBreadcrumbBack(T data); } diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties index 26ee4ddebd..4a5fb7d79a 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties @@ -1349,5 +1349,7 @@ Button.breadcrumbSelectedForeground = #000000 [style]Button.breadcrumbButton = \ background: null;\ - foreground: null; \ - + foreground: #8F999F; \ + hoverBackground: #E6E9EF; \ + pressedBackground: #DADEE7; \ + selectedBackground: null