Browse Source

增加buttonUI悬浮背景和点击背景

newui
renekton 5 months ago
parent
commit
2882415a33
  1. 1
      designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java
  2. 8
      designer-base/src/main/java/com/fr/design/gui/frpane/FineBreadcrumbPane.java
  3. 6
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

1
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";
/**

8
designer-base/src/main/java/com/fr/design/gui/frpane/FineBreadcrumbPane.java

@ -81,6 +81,8 @@ public class FineBreadcrumbPane <T> 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 <T> 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 <T> extends Row {
}
}
/**
* 节点点击关联动作监听器
* @param <T>
*/
public interface BreadcrumbBackListener <T> {
void onBreadcrumbBack(T data);
}

6
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

Loading…
Cancel
Save