Browse Source

REPORT-58403 【主题切换】组件右侧边框标题部分,间距有点大

【问题原因】
去除多余的视图容器

【改动思路】
同上
fix-lag
Starryi 3 years ago
parent
commit
d61cf5a4c4
  1. 13
      designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java

13
designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java

@ -303,13 +303,16 @@ public class ComponentTitleStylePane extends AbstractBorderPackerPane {
return;
}
JPanel container = this;
for (JComponent component: components) {
for (int i = 0; i < components.length; i++) {
JComponent component = components[i];
if (component != null) {
container.add(component, BorderLayout.NORTH);
JPanel nextContainer = new JPanel(FRGUIPaneFactory.createBorderLayout());
nextContainer.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, 0, 0));
container.add(nextContainer, BorderLayout.CENTER);
container = nextContainer;
component.setBorder(BorderFactory.createEmptyBorder(i == 0 ? 0 : IntervalConstants.INTERVAL_L1, 0, 0, 0));
if (i < components.length - 1) {
JPanel nextContainer = new JPanel(FRGUIPaneFactory.createBorderLayout());
container.add(nextContainer, BorderLayout.CENTER);
container = nextContainer;
}
}
}
}

Loading…
Cancel
Save