Browse Source

Pull request #7424: REPORT-65381 linux_arm设计器-点击菜单栏文件-选项,出现弹窗后再点击 确定按钮,弹窗不消失,无任何反应 && REPORT-65369 设计器内对macOS12的处理-按钮图标设置-在点击 选择图片时回到了父弹窗界面,没有实时显示出来,而需要再次单机设计器界面

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit 'd1321ea0815c4b4a4c4b672b38ac363728852cf6':
  REPORT-65369 设计器内对macOS12的处理-按钮图标设置-在点击 选择图片时回到了父弹窗界面,没有实时显示出来,而需要再次单机设计器界面
  REPORT-65381 linux_arm设计器-点击菜单栏文件-选项,出现弹窗后再点击 确定按钮,弹窗不消失,无任何反应
zheng-1641779399395
Hades 3 years ago
parent
commit
448fb8c90e
  1. 2
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  2. 7
      designer-base/src/main/java/com/fr/design/web/CustomIconPane.java

2
designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java

@ -788,7 +788,7 @@ public class PreferencePane extends BasicPane {
designerEnvManager.setJoinProductImprove(this.joinProductImproveCheckBox.isSelected());
designerEnvManager.setEmbedServerLazyStartup(this.embedServerLazyStartupCheckBox.isSelected());
designerEnvManager.setImageCompress(this.imageCompressPanelCheckBox.isSelected());
designerEnvManager.setUseOptimizedUPM4Adapter(this.useOptimizedUPMCheckbox.isSelected());
designerEnvManager.setUseOptimizedUPM4Adapter(this.useOptimizedUPMCheckbox != null && this.useOptimizedUPMCheckbox.isSelected());
VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager();
vcsConfigManager.setSaveInterval(this.saveIntervalEditor.getValue());
vcsConfigManager.setVcsEnable(this.vcsEnableCheckBox.isSelected());

7
designer-base/src/main/java/com/fr/design/web/CustomIconPane.java

@ -40,6 +40,7 @@ import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Window;
import javax.swing.ButtonGroup;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
@ -425,7 +426,7 @@ public class CustomIconPane extends BasicPane {
browseButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
onBrowseButtonClicked();
onBrowseButtonClicked(SwingUtilities.getWindowAncestor(EditIconDialog.this));
}
});
@ -460,11 +461,11 @@ public class CustomIconPane extends BasicPane {
this.add(centerPane, BorderLayout.CENTER);
}
private void onBrowseButtonClicked() {
private void onBrowseButtonClicked(Window parent) {
// carl:不知道是否只要png格式,反正导出时全部都转成png了
FileChooserProvider fileChooserProvider = FileChooserFactory.createFileChooser(FileChooserArgs.newBuilder().
setFilter("Icon Image File", "*.jpg", "*.jpeg", "*.png", "*.gif").build());
if (JFileChooser.APPROVE_OPTION == fileChooserProvider.showDialog(DesignerContext.getDesignerFrame())) {
if (JFileChooser.APPROVE_OPTION == fileChooserProvider.showDialog(parent)) {
String path = fileChooserProvider.getSelectedFile().getAbsolutePath();
// 图片存储有最大值48*48限制,没有超过最大值时,按原图大小存储,超过最大值后,压缩至最大值存储
Image image = BaseUtils.readImage(path);

Loading…
Cancel
Save