Browse Source

图例自定义位置弹窗缩放,关闭其他模板保存版本未更新问题,左右面板分割位置缩放

newui
renekton 3 months ago
parent
commit
107e450d12
  1. 3
      designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java
  2. 6
      designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java
  3. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java

3
designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.controlpane; package com.fr.design.gui.controlpane;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.border.FineBorderFactory; import com.fr.design.border.FineBorderFactory;
@ -29,7 +30,7 @@ import java.util.stream.Stream;
* Time: 15:07 * Time: 15:07
*/ */
abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, ShortCutListenerProvider { abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, ShortCutListenerProvider {
private static final int SHORT_WIDTH = 30; //每加一个short Divider位置加30 private static final int SHORT_WIDTH = FineUIScale.scale(30); //每加一个short Divider位置加30
private static final String SELECT = "SELECT"; private static final String SELECT = "SELECT";
private static final String EDIT = "EDIT"; private static final String EDIT = "EDIT";
JPanel controlUpdatePane; JPanel controlUpdatePane;

6
designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java

@ -184,6 +184,10 @@ public class VcsHelper implements JTemplateActionListener {
private String getEditingFilename() { private String getEditingFilename() {
JTemplate jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); JTemplate jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
return getFilename(jt);
}
private String getFilename(JTemplate jt) {
String editingFilePath = jt.getEditingFILE().getPath(); String editingFilePath = jt.getEditingFILE().getPath();
return VcsFileUtils.dealWithFilePath(editingFilePath); return VcsFileUtils.dealWithFilePath(editingFilePath);
} }
@ -215,7 +219,7 @@ public class VcsHelper implements JTemplateActionListener {
fireVcs.execute(new Runnable() { fireVcs.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
String fileName = getEditingFilename(); String fileName = getFilename(jt);
VcsOperator operator = WorkContext.getCurrent().get(VcsOperator.class); VcsOperator operator = WorkContext.getCurrent().get(VcsOperator.class);
VcsEntity entity = operator.getFileVersionByIndex(fileName, 0); VcsEntity entity = operator.getFileVersionByIndex(fileName, 0);
boolean replace = needDeleteVersion(entity); boolean replace = needDeleteVersion(entity);

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java

@ -51,8 +51,8 @@ import static com.fine.swing.ui.layout.Layouts.row;
public class VanChartPlotLegendPane extends BasicPane { public class VanChartPlotLegendPane extends BasicPane {
private static final long serialVersionUID = 1614283200308877353L; private static final long serialVersionUID = 1614283200308877353L;
private static final int WIDTH = 165; private static final int WIDTH = FineUIScale.scale(165);
private static final int HEIGHT = 100; private static final int HEIGHT = FineUIScale.scale(100);
private static final int GAP = 20; private static final int GAP = 20;
private Plot plot; private Plot plot;

Loading…
Cancel
Save