Browse Source

Merge pull request #1263 in DESIGN/design from ~HADES/design:bugfix/10.0 to bugfix/10.0

* commit '820fcc273072d7f72348d7e73fe9284934691322':
  fix
  REPORT-23246 设计器UI 插入斜线显示不全
bugfix/10.0
Hades 5 years ago
parent
commit
fc28305a38
  1. 36
      designer-base/src/main/java/com/fr/design/utils/gui/FineDesignScreen.java
  2. 3
      designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java

36
designer-base/src/main/java/com/fr/design/utils/gui/FineDesignScreen.java

@ -0,0 +1,36 @@
package com.fr.design.utils.gui;
import com.fr.stable.os.OperatingSystem;
import java.awt.*;
/**
* @author hades
* @version 10.0
* Created by hades on 2019/10/29
*/
public enum FineDesignScreen {
/**
* 一个临界dpi
* 设计器(windows/linux)大于等于该dpi界面ui变得很小 (jdk bug 在jdk9修复: http://openjdk.java.net/jeps/263)
*/
DPI_144(144);
private int value;
FineDesignScreen(int value) {
this.value = value;
}
/**
* 判断win/linux下的dpi macos不做处理
* @return
*/
public static boolean isHighDPI() {
if (OperatingSystem.isMacos()) {
return false;
}
return Toolkit.getDefaultToolkit().getScreenResolution() >= DPI_144.value;
}
}

3
designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java

@ -10,6 +10,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.utils.gui.FineDesignScreen;
import com.fr.general.ComparatorUtils;
import com.fr.grid.Grid;
import com.fr.report.cell.TemplateCellElement;
@ -35,7 +36,7 @@ import java.awt.event.ActionListener;
public class BiasTextPainterCellEditor extends AbstractCellEditor {
private BiasTextPainterPane biasTextPainterPane = null;
private static final double MULTIPLE = 1.5;
private static final double MULTIPLE = FineDesignScreen.isHighDPI() ? 2 : 1.5;
/**
* Constructor.

Loading…
Cancel
Save