diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java index 648cb03f33..f7229136f5 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java @@ -387,8 +387,6 @@ public abstract class UIControlPane extends JControlPane { contentPane.setBackground(originColor); contentPane.setLayout(new BorderLayout()); titleLabel = new UILabel(title); - Font font = new Font("SimSun", Font.PLAIN, 12); - titleLabel.setFont(font); contentPane.add(titleLabel, BorderLayout.WEST); contentPane.setBorder(new EmptyBorder(5, 14, 6, 0)); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java index d5103f8246..9544b25639 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java @@ -316,7 +316,6 @@ public abstract class TemplateThemeProfilePane extends colorListExtendedPane.populate(colors); FineColorManager.FineColorReplaceByColorScheme replaceByColorScheme = new FineColorManager.FineColorReplaceByColorScheme(colors); T theme = updateBean(); - FineColorFlushUtils.replaceCacheObject(theme, replaceByColorScheme); FineColorManager.traverse(theme, replaceByColorScheme); populateBean4CustomEditors(theme); diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java index 7f571ce9e3..b7fd34df97 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java @@ -28,6 +28,7 @@ import com.fr.design.utils.gui.LayoutUtils; import com.fr.form.main.Form; import com.fr.form.main.WidgetGather; import com.fr.form.parameter.FormSubmitButton; +import com.fr.form.ui.AbstractBorderStyleWidget; import com.fr.form.ui.Button; import com.fr.form.ui.CardAddButton; import com.fr.form.ui.CardSwitchButton; @@ -232,7 +233,7 @@ public class XCreatorUtils { JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); TemplateTheme theme = template.getTemplateTheme(); if (theme instanceof FormTheme) { - setupTemplateTheme(creator, (FormTheme) theme, TemplateThemeCompatible.NONE); + setupTemplateTheme(creator, true, (FormTheme) theme, TemplateThemeCompatible.NONE); } return creator; } @@ -378,12 +379,16 @@ public class XCreatorUtils { return null; } - public static void setupTemplateTheme(XCreator container, final FormTheme currentTemplateUsingTheme, TemplateThemeCompatible compatible) { + + public static void setupTemplateTheme(XCreator container, final boolean forceFollowingTheme, final FormTheme currentTemplateUsingTheme, TemplateThemeCompatible compatible) { FineColorGather colorGather = new FineColorManager.FineColorReplaceByTheme(currentTemplateUsingTheme, compatible); Form.traversalWidget(container.toData(), new WidgetGather() { @Override public void dealWith(Widget widget) { TemplateThemeAware themedWidget = (TemplateThemeAware) widget; + if (forceFollowingTheme && widget instanceof AbstractBorderStyleWidget) { + ((AbstractBorderStyleWidget) widget).setBorderStyleFollowingTheme(true); + } themedWidget.onTemplateUsingThemeChange(currentTemplateUsingTheme, compatible); } diff --git a/designer-form/src/main/java/com/fr/design/fit/attrpane/FRAbsoluteBodyLayoutExtendDefinePane.java b/designer-form/src/main/java/com/fr/design/fit/attrpane/FRAbsoluteBodyLayoutExtendDefinePane.java index 5fafb8df8e..563ed16aa6 100644 --- a/designer-form/src/main/java/com/fr/design/fit/attrpane/FRAbsoluteBodyLayoutExtendDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/fit/attrpane/FRAbsoluteBodyLayoutExtendDefinePane.java @@ -115,12 +115,10 @@ public class FRAbsoluteBodyLayoutExtendDefinePane extends FRAbsoluteLayoutDefine initLayoutComboBox(); UILabel layoutTypeLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Attr_Layout_Type")); - UILabel scaleModeLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Scaling_Mode")); JPanel contentPane = TableLayoutHelper.createGapTableLayoutPane( new Component[][]{ - {layoutTypeLabel, layoutCombox}, - {scaleModeLabel, comboBox} + {layoutTypeLabel, layoutCombox} }, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/ToolBarButton.java b/designer-form/src/main/java/com/fr/design/mainframe/ToolBarButton.java index 4c18ba4750..53b9c52915 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/ToolBarButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/ToolBarButton.java @@ -99,7 +99,7 @@ public class ToolBarButton extends UIButton implements MouseListener, MouseMotio creatorSource = no.getNameOption().createWidget(); } if (creatorSource != null) { - XCreator xCreator = XCreatorUtils.createXCreator(creatorSource); + XCreator xCreator = XCreatorUtils.createThemedXCreator(creatorSource); WidgetToolBarPane.getTarget().startDraggingBean(xCreator); FormDesignerUtils.addWidgetProcessInfo(xCreator.toData()); lastPressEvent = null; diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java b/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java index 53bea94809..476afe8b66 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java @@ -251,7 +251,10 @@ public class CreateComponentAction extends UpdateAction { private Image componentToImage(Component comp, Rectangle rect) { - BufferedImage im = new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_RGB); + BufferedImage im = new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_ARGB); + Graphics2D g2d = (Graphics2D)im.getGraphics(); + g2d.setColor(Color.WHITE); + g2d.fillRect(0, 0 , rect.width, rect.height); comp.paint(im.getGraphics()); return im; } @@ -260,7 +263,7 @@ public class CreateComponentAction extends UpdateAction { private Image moduleToImage(Form form, ElementCaseEditor editor, Map parameterMap, Rectangle rect) { if (editor == null) { - return new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_RGB); + return new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_ARGB); } FormElementCaseProvider provider = editor.getElementCase(); provider.setName(editor.getWidgetName()); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java b/designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java index 72418b86be..0dd613975e 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java @@ -61,7 +61,7 @@ public class ShareComponentUtils { boolean isCurrentUsingThemeSuitSharedComponent = StringUtils.isNotEmpty(theme.getName()) && StringUtils.isNotEmpty(suitableTemplateThemeName) && StringUtils.equals(theme.getName(), suitableTemplateThemeName); - XCreatorUtils.setupTemplateTheme(creator, (FormTheme) theme, isCurrentUsingThemeSuitSharedComponent ? TemplateThemeCompatible.NONE : TemplateThemeCompatible.ABSENT); + XCreatorUtils.setupTemplateTheme(creator, false, (FormTheme) theme, isCurrentUsingThemeSuitSharedComponent ? TemplateThemeCompatible.NONE : TemplateThemeCompatible.ABSENT); } return creator; } diff --git a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java index 23dbc77f58..7a23a1396a 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java @@ -383,8 +383,27 @@ public class CellSelection extends Selection { return false; } } - - ec.merge(row, row + rowSpan - 1, column, column + columnSpan - 1); + int rowStartIndex = row; + int rowEndIndex = row + rowSpan - 1; + int columnStartIndex = column; + int columnEndIndex = column + columnSpan - 1; + + // 合并已有单元格,还是新建单元格 + boolean hasCellElement = false; + for (int ri = rowStartIndex; ri <= rowEndIndex; ri++) { + for (int ci = columnStartIndex; ci <= columnEndIndex; ci++) { + CellElement ce = ec.getCellElement(ci, ri); + if (ce != null) { + hasCellElement = true; + break; + } + } + } + if (hasCellElement) { + ec.merge(row, row + rowSpan - 1, column, column + columnSpan - 1); + } else { + ec.addCellElement(DefaultThemedTemplateCellElementCase.createInstance(column, row, columnSpan, rowSpan, null), true); + } return true; } diff --git a/designer-realize/src/main/resources/com/fr/design/images/splash.png b/designer-realize/src/main/resources/com/fr/design/images/splash.png index 395d1d2a61..0535306e30 100644 Binary files a/designer-realize/src/main/resources/com/fr/design/images/splash.png and b/designer-realize/src/main/resources/com/fr/design/images/splash.png differ diff --git a/designer-realize/src/main/resources/com/fr/design/images/splash@2x.png b/designer-realize/src/main/resources/com/fr/design/images/splash@2x.png index 1ef35c2b01..a284a5585e 100644 Binary files a/designer-realize/src/main/resources/com/fr/design/images/splash@2x.png and b/designer-realize/src/main/resources/com/fr/design/images/splash@2x.png differ diff --git a/designer-realize/src/main/resources/com/fr/design/images/splash_en.png b/designer-realize/src/main/resources/com/fr/design/images/splash_en.png index 42538c0054..9e3cac4197 100644 Binary files a/designer-realize/src/main/resources/com/fr/design/images/splash_en.png and b/designer-realize/src/main/resources/com/fr/design/images/splash_en.png differ diff --git a/designer-realize/src/main/resources/com/fr/design/images/splash_en@2x.png b/designer-realize/src/main/resources/com/fr/design/images/splash_en@2x.png index eaed5f1af7..8e90c76e33 100644 Binary files a/designer-realize/src/main/resources/com/fr/design/images/splash_en@2x.png and b/designer-realize/src/main/resources/com/fr/design/images/splash_en@2x.png differ