Browse Source

REPORT-67303 【视觉验收】组件商城面向风格化

【问题原因】
优化mini商城尺寸

【改动思路】
同上
feature/x
Starryi 3 years ago
parent
commit
9531c526b0
  1. 15
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java

15
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java

@ -1,15 +1,13 @@
package com.fr.design.mainframe.share.ui.online.mini; package com.fr.design.mainframe.share.ui.online.mini;
import com.fr.base.ScreenResolution;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.share.mini.MiniShopDisposingChecker; import com.fr.design.mainframe.share.mini.MiniShopDisposingChecker;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.Constants;
import com.fr.stable.unit.FU;
import com.fr.stable.unit.UNIT;
import javax.swing.JFrame; import javax.swing.JFrame;
import java.awt.Container; import java.awt.Container;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
import java.awt.Window; import java.awt.Window;
import java.awt.event.WindowEvent; import java.awt.event.WindowEvent;
import java.awt.event.WindowListener; import java.awt.event.WindowListener;
@ -36,10 +34,11 @@ public class MiniComponentShopDialog {
final JFrame frame = new JFrame(); final JFrame frame = new JFrame();
final MiniComponentShopPane shopPane = new MiniComponentShopPane(); final MiniComponentShopPane shopPane = new MiniComponentShopPane();
final UNIT width = FU.getInstance(900 * Constants.FU_PER_OLD_PIX); GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
final UNIT height = FU.getInstance(600 * Constants.FU_PER_OLD_PIX); Rectangle rect =ge.getMaximumWindowBounds();
int resolution = ScreenResolution.getScreenResolution(); int width = (int) (rect.width * 0.8);
frame.setSize(width.toPixI(resolution), height.toPixI(resolution)); int height = (int) (rect.height * 0.9);
frame.setSize(width, height);
frame.setTitle(Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Window_Title")); frame.setTitle(Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Window_Title"));
frame.add(shopPane); frame.add(shopPane);
frame.setResizable(false); frame.setResizable(false);

Loading…
Cancel
Save