Browse Source

Pull request #9184: REPORT-73670 & REPORT-70647

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

* commit '9f514db78987209976b1e83ab1c3daa3eec5b6c3':
  REPORT-70647 远程设计器场景下主题内边框配置无法使用
  REPORT-73670 新建表单背景没有应用主题
newui
starryi 3 years ago
parent
commit
e7ca8b68df
  1. 8
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/ThemedFeatureController.java

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

@ -190,6 +190,10 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
public JTemplate(T t, FILE file, boolean isNewFile, Parameter[] parameters) {
super(t);
if (isNewFile) {
// REPORT-58486: 必须在初始的UndoState创建前设置主题,使得初始的UndoState就包含了主题效果
setUpTheme4NewTemplate();
}
beforeInit();
// 判断是否切换设计器状态到禁止拷贝剪切
if (t.getAttrMark(DesignBanCopyAttrMark.XML_TAG) != null) {
@ -1926,10 +1930,10 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
protected void setUpTheme4NewTemplate() {
TemplateTheme theme = getUsingTemplateThemeConfig().cachedFetchTheme4NewTemplate();
TemplateThemeAttrMark themeAttrMark = template.getAttrMark(TemplateThemeAttrMark.XML_TAG);
TemplateThemeAttrMark themeAttrMark = getTarget().getAttrMark(TemplateThemeAttrMark.XML_TAG);
if (themeAttrMark == null) {
themeAttrMark = new TemplateThemeAttrMark();
template.addAttrMark(themeAttrMark);
getTarget().addAttrMark(themeAttrMark);
}
themeAttrMark.setName(theme.getName());
themeAttrMark.setDark(theme.isDark());

3
designer-base/src/main/java/com/fr/design/mainframe/theme/ThemedFeatureController.java

@ -1,7 +1,6 @@
package com.fr.design.mainframe.theme;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.theme.SupportThemedCellInnerBorderFeature;
import com.fr.workspace.server.theme.ThemedCellBorderFeature;
/**
@ -12,6 +11,6 @@ import com.fr.workspace.server.theme.ThemedCellBorderFeature;
public class ThemedFeatureController {
public static boolean isCellStyleSupportInnerBorder() {
ThemedCellBorderFeature controller = WorkContext.getCurrent().get(ThemedCellBorderFeature.class);
return controller instanceof SupportThemedCellInnerBorderFeature;
return controller.isSupport();
}
}

Loading…
Cancel
Save