Browse Source

REPORT-135476 fix:NewUI恢复网格线功能

fbp/merge
Levy.Xie-解安森 3 months ago
parent
commit
cd4c63cf8a
  1. 10
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 6
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java

10
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -159,7 +159,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada
private boolean rowHeaderVisible = true;
private boolean verticalScrollBarVisible = true;
private boolean horizontalScrollBarVisible = true;
private Color gridLineColor = Color.lightGray; // line color.
private Color gridLineColor = new Color(230, 233, 239); // line color.
private Color paginationLineColor = Color.black; // line color of paper
private boolean supportCellEditorDef = false;
private boolean isDragPermited = false;
@ -2167,10 +2167,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada
this.setUndoLimit(reader.getAttrAsInt("undoLimit", 5));
this.setStartWithEmptyFile(reader.getAttrAsBoolean("startWithEmptyFile", false));
this.setDefaultStringToFormula(reader.getAttrAsBoolean("defaultStringToFormula", false));
if ((tmpVal = reader.getAttrAsString("gridLineColor", null)) != null) {
if ((tmpVal = reader.getAttrAsString("uiGridLineColor", null)) != null) {
this.setGridLineColor(new Color(Integer.parseInt(tmpVal)));
}
if ((tmpVal = reader.getAttrAsString("paginationLineColor", null)) != null) {
if ((tmpVal = reader.getAttrAsString("uiPaginationLineColor", null)) != null) {
this.setPaginationLineColor(new Color(Integer.parseInt(tmpVal)));
}
}
@ -2602,8 +2602,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada
.attr("horizontalScrollBarVisible", this.isHorizontalScrollBarVisible())
.attr("supportCellEditorDef", this.isSupportCellEditorDef())
.attr("isDragPermited", this.isDragPermited())
.attr("gridLineColor", this.getGridLineColor().getRGB())
.attr("paginationLineColor", this.getPaginationLineColor().getRGB())
.attr("uiGridLineColor", this.getGridLineColor().getRGB())
.attr("uiPaginationLineColor", this.getPaginationLineColor().getRGB())
.attr("undoLimit", this.getUndoLimit())
.attr("startWithEmptyFile", this.isStartWithEmptyFile())
.end();

6
designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java

@ -4,7 +4,6 @@
package com.fr.design.mainframe;
import com.fine.theme.icon.LazyIcon;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.BaseFormula;
import com.fr.base.DynamicUnitList;
import com.fr.base.Formula;
@ -410,9 +409,8 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
grid.setDefaultFloatEditor(CellImagePainter.class, new ImageFloatEditor());
DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager();
// todo: 主题化与env.xml内定义的属性优先级问题
grid.setGridLineColor(FlatUIUtils.getUIColor("Center.ZoneBorderColor", designerEnvManager.getGridLineColor()));
grid.setPaginationLineColor(FlatUIUtils.getUIColor("Center.PageLineColor", designerEnvManager.getPaginationLineColor()));
grid.setGridLineColor(designerEnvManager.getGridLineColor());
grid.setPaginationLineColor(designerEnvManager.getPaginationLineColor());
}
private void addExtraCellEditor(Grid grid) {

Loading…
Cancel
Save