Browse Source

REPORT-58638 【主题切换】主题编辑页面,组件样式里选了图片以后,上下滑动十几次才能滑到底

【问题原因】
换其他滚动控件实现

【改动思路】
同上
fix-lag
Starryi 3 years ago
parent
commit
d9efa33f14
  1. 15
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java

15
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.theme.edit;
import com.fr.base.theme.settings.ThemedComponentStyle; import com.fr.base.theme.settings.ThemedComponentStyle;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.style.ComponentBodyStylePane; import com.fr.design.gui.style.ComponentBodyStylePane;
import com.fr.design.gui.style.ComponentIntegralStylePane; import com.fr.design.gui.style.ComponentIntegralStylePane;
@ -113,7 +114,7 @@ public class ComponentStyleEditPane extends JPanel {
} }
} }
private JComponent createTabContainer(final JComponent component) { private JComponent createTabContainer(final JPanel component) {
JPanel container = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel container = FRGUIPaneFactory.createBorderLayout_S_Pane();
container.setPreferredSize(new Dimension(container.getPreferredSize().width, 220)); container.setPreferredSize(new Dimension(container.getPreferredSize().width, 220));
@ -123,12 +124,12 @@ public class ComponentStyleEditPane extends JPanel {
tipLabelPane.add(tipLabel); tipLabelPane.add(tipLabel);
container.add(tipLabelPane, BorderLayout.NORTH); container.add(tipLabelPane, BorderLayout.NORTH);
JScrollPane scrollPane = new JScrollPane(component); container.add(new AttrScrollPane() {
scrollPane.setPreferredSize(new Dimension(container.getPreferredSize().width, 220)); @Override
scrollPane.setBorder(BorderFactory.createEmptyBorder()); protected JPanel createContentPane() {
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); return component;
}
container.add(scrollPane, BorderLayout.CENTER); }, BorderLayout.CENTER);
return container; return container;

Loading…
Cancel
Save