Browse Source

Pull request #5703: REPORT-58698 & REPORT-58503 & REPORT-58721 & REPORT-58638 & REPORT-58722

Merge in DESIGN/design from ~STARRYI/design:release/11.0 to release/11.0

* commit 'da1abd51274c7cbca0358b62a96e0e80cfa705e1':
  REPORT-58722 【主题切换】设计器操作一段时间,编辑主题保存很慢,甚至卡死
  REPORT-58638 【主题切换】主题编辑页面,组件样式里选了图片以后,上下滑动十几次才能滑到底
  REPORT-58721 【主题切换】单元格样式下面空白区域,应该是灰色的
  REPORT-58503 【主题切换】预览区ui改版
  REPORT-58698 主题切换-主题配置相关问题
fix-lag
starryi 3 years ago
parent
commit
183924d645
  1. 8
      designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  3. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java
  4. 15
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java
  5. BIN
      designer-form/src/main/resources/com/fr/design/form/images/theme4newTemplate.png
  6. 2
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/ThemedCellStyleListPane.java

8
designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java

@ -3,11 +3,7 @@ package com.fr.design.cell;
import com.fr.base.NameStyle;
import com.fr.base.ScreenResolution;
import com.fr.base.Style;
import com.fr.design.mainframe.theme.TemplateThemeBlock;
import com.fr.general.IOUtils;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JPanel;
import java.awt.Dimension;
import java.awt.Graphics;
@ -25,14 +21,12 @@ public class CellStylePreviewPane extends JPanel {
private static final Image transparentBackgroundImage = Toolkit.getDefaultToolkit().createImage(CellStylePreviewPane.class.getResource("/com/fr/design/images/transparent_background.png"));
private final float transparentBackgroundWidth;
private final float transparentBackgroundHeight;
private final float transparentBackgroundAspect;
private String paintText = "Report";
private Style style = Style.DEFAULT_STYLE;
public CellStylePreviewPane() {
transparentBackgroundWidth = transparentBackgroundImage.getWidth(null);
transparentBackgroundHeight = transparentBackgroundImage.getHeight(null);
transparentBackgroundAspect = 1.0F * transparentBackgroundImage.getWidth(null) / transparentBackgroundImage.getHeight(null);
}
public void setStyle(Style style) {
@ -72,7 +66,7 @@ public class CellStylePreviewPane extends JPanel {
Style.paintContent(g2d, paintText, style, width, height, resolution);
Style.paintBorder(g2d, style, getWidth() - 3, getHeight() - 3);
Style.paintBorder(g2d, style, width, height);
}
@Override

2
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -251,7 +251,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
if (themeConfigChangeListener != null) {
TemplateThemeConfig<? extends TemplateTheme> config = getUsingTemplateThemeConfig();
if (config != null) {
config.addThemeConfigChangeListener(themeConfigChangeListener);
config.removeThemeConfigChangeListener(themeConfigChangeListener);
}
}
}

2
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java

@ -193,7 +193,7 @@ public class TemplateThemeBlock<T extends TemplateTheme> extends JPanel {
}
if (displayTheme4NewTemplateMarker && StringUtils.equals(config.getThemeName4NewTemplate(), name)) {
theme4NewTemplateMarkIcon.paintIcon(this, g, 0, 0);
theme4NewTemplateMarkIcon.paintIcon(this, g, 0, thumbnailPane.getHeight() - 16);
}
if (selected || this.hovering) {

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.design.designer.IntervalConstants;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.style.ComponentBodyStylePane;
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();
container.setPreferredSize(new Dimension(container.getPreferredSize().width, 220));
@ -123,12 +124,12 @@ public class ComponentStyleEditPane extends JPanel {
tipLabelPane.add(tipLabel);
container.add(tipLabelPane, BorderLayout.NORTH);
JScrollPane scrollPane = new JScrollPane(component);
scrollPane.setPreferredSize(new Dimension(container.getPreferredSize().width, 220));
scrollPane.setBorder(BorderFactory.createEmptyBorder());
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
container.add(scrollPane, BorderLayout.CENTER);
container.add(new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
return component;
}
}, BorderLayout.CENTER);
return container;

BIN
designer-form/src/main/resources/com/fr/design/form/images/theme4newTemplate.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 611 B

2
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/ThemedCellStyleListPane.java

@ -42,6 +42,8 @@ public class ThemedCellStyleListPane extends FurtherBasicBeanPane<NameStyle> imp
defaultListModel = new DefaultListModel<>();
styleList = new JList<>(defaultListModel);
styleList.setCellRenderer(new RadioButtonListCellRenderer());
styleList.setOpaque(false);
styleList.setBackground(null);
setLayout(FRGUIPaneFactory.createBorderLayout());
add(styleList, BorderLayout.CENTER);
setBorder(BorderFactory.createEmptyBorder(0 ,LEFT_BORDER, 0, RIGHT_BORDER));

Loading…
Cancel
Save