Browse Source

Pull request #9171: REPORT-73283 & REPORT-73557

Merge in DESIGN/design from ~HARRISON/design:feature/x to feature/x

* commit '0f8406f3c4442ec7b11f352163f5eefe4a0a9731':
  REPORT-73557【设计器环境监测】预期外的启动弹窗交互与设计稿不一致 1、修改一下字体的实现,不然和其他的字体不统一。 2、初始化一下 UI
  REPORT-73283【设计器环境监测】个别jar异常时,不会触发自动检测 改一个国际化信息
feature/x
Harrison 2 years ago
parent
commit
1ee5b434e3
  1. 2
      designer-base/src/main/java/com/fr/env/detect/impl/JarInconsistentDetector.java
  2. 13
      designer-base/src/main/java/com/fr/env/detect/ui/DetectorErrorDialog.java

2
designer-base/src/main/java/com/fr/env/detect/impl/JarInconsistentDetector.java vendored

@ -136,7 +136,7 @@ public class JarInconsistentDetector extends AbstractExceptionDetector {
return DetectorResult.exception(type(),
new ExceptionTips(new Message.Simple(tipsMessage)),
new ExceptionSolution(new Message.Link(Toolkit.i18nText(type().getSolutionLocale()), DetectorConstants.JAR_HELP_LINK), null),
ExceptionLog.create(type().getLogLocale() + message));
ExceptionLog.create(Toolkit.i18nText(type().getLogLocale()) + message));
}
private Map<String, String> groupBy(List<BuildInfo> localInfos) {

13
designer-base/src/main/java/com/fr/env/detect/ui/DetectorErrorDialog.java vendored

@ -7,6 +7,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.ColorUtils;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.env.detect.base.DetectorUtil;
import com.fr.env.detect.bean.DetectorResult;
@ -14,7 +15,6 @@ import com.fr.env.detect.bean.ExceptionSolution;
import com.fr.env.detect.bean.ExceptionTips;
import com.fr.env.detect.bean.Message;
import com.fr.exit.DesignerExiter;
import com.fr.general.FRFont;
import javax.swing.BorderFactory;
import javax.swing.JDialog;
@ -39,13 +39,17 @@ import java.util.List;
* created by Harrison on 2022/05/29
**/
public class DetectorErrorDialog extends JDialog implements ActionListener {
public static final float FONT_BOLD_HEIGHT = 16f;
private UIButton okButton;
private UIButton restartButton;
public DetectorErrorDialog(Frame parent, List<DetectorResult> results) {
super(parent, true);
// 可能是还没初始化 UI 的时候出现的问题,初始化一下 UI
DesignUtils.initLookAndFeel();
JPanel northPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel headerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -57,8 +61,9 @@ public class DetectorErrorDialog extends JDialog implements ActionListener {
JPanel messagePane = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
{
UILabel boldHeader = new UILabel(Toolkit.i18nText("Fine-Design_Error_Start_Apology_Message"));
Font font = FRFont.getInstance(boldHeader.getFont().getFontName(), Font.PLAIN, 16);
boldHeader.setFont(font);
Font font = boldHeader.getFont();
Font boldFont = font.deriveFont(FONT_BOLD_HEIGHT);
boldHeader.setFont(boldFont);
messagePane.add(boldHeader);
UILabel description = new UILabel(Toolkit.i18nText("Fine-Design_Send_Report_To_Us"));

Loading…
Cancel
Save