From 585b289dabc03b7bf69c529e548542fa21f11397 Mon Sep 17 00:00:00 2001 From: Starryi Date: Fri, 4 Mar 2022 17:37:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-67348=20=E7=BB=84=E4=BB=B6=E5=8C=85?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=8F=90=E7=A4=BA=E6=96=87=E6=9C=AC=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E9=87=8F=E4=B8=8D=E7=AC=A6=E5=90=88=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E6=84=8F=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 下载组件包时后台已做过兼容性检测和去重处理,因此下载的组件包中本身就是兼容的组件。 所以不存在不兼容的组件。 【改动思路】 同上 REPORT-67348 组件包下载提示文本中的数量不符合设计意图 【问题原因】 下载组件包时后台已做过兼容性检测和去重处理,因此下载的组件包中本身就是兼容的组件。 所以不存在不兼容的组件。 【改动思路】 同上 --- .../mini/bridge/NativeProductBridge.java | 39 +++++-------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/bridge/NativeProductBridge.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/bridge/NativeProductBridge.java index e6a4f720c..4cb985b5a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/bridge/NativeProductBridge.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/bridge/NativeProductBridge.java @@ -254,9 +254,9 @@ public class NativeProductBridge { MiniComponentShopDialog.getInstance().getContentPane(), Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Download_Incompatible_Component_Tip"), "", - FineJOptionPane.YES_NO_OPTION + FineJOptionPane.OK_CANCEL_OPTION ); - allowedDownload = result == JOptionPane.YES_OPTION; + allowedDownload = result == JOptionPane.OK_OPTION; } if (allowedDownload) { fireStartEvent(null); @@ -353,33 +353,14 @@ public class NativeProductBridge { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - boolean allowedDownload; - OnlineShareWidget[] childrenWidgets = OnlineShopUtils.getPackageWidgets(widget, false); - boolean isCompatibleWithCurrentEnv = true; - for (OnlineShareWidget children: childrenWidgets) { - if (!children.isCompatibleWithCurrentEnv()) { - isCompatibleWithCurrentEnv = false; - break; - } - } - int result; - if (!isCompatibleWithCurrentEnv) { - result = FineJOptionPane.showConfirmDialog( - MiniComponentShopDialog.getInstance().getContentPane(), - Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Download_Incompatible_Components_Package_Tip", childrenCount), - "", - FineJOptionPane.YES_NO_OPTION - ); - } else { - result = FineJOptionPane.showConfirmDialog( - MiniComponentShopDialog.getInstance().getContentPane(), - Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Download_Components_Package_Tip", childrenCount), - "", - FineJOptionPane.YES_NO_OPTION - ); - } - allowedDownload = result == JOptionPane.YES_OPTION; - if (allowedDownload) { + OnlineShareWidget[] childrenWidgets = OnlineShopUtils.getPackageWidgets(widget, true); + int result = FineJOptionPane.showConfirmDialog( + MiniComponentShopDialog.getInstance().getContentPane(), + Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Download_Components_Package_Tip", childrenWidgets.length), + "", + FineJOptionPane.OK_CANCEL_OPTION + ); + if (result == JOptionPane.OK_OPTION) { fireStartEvent(null); action.install(); } else { From 9531c526b0a67ab4e0f225dfdc135cbe8626615a Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 7 Mar 2022 10:12:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-67303=20=E3=80=90=E8=A7=86=E8=A7=89?= =?UTF-8?q?=E9=AA=8C=E6=94=B6=E3=80=91=E7=BB=84=E4=BB=B6=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E9=9D=A2=E5=90=91=E9=A3=8E=E6=A0=BC=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 优化mini商城尺寸 【改动思路】 同上 --- .../ui/online/mini/MiniComponentShopDialog.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java index be2d72466..bb600674b 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java +++ b/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; -import com.fr.base.ScreenResolution; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.share.mini.MiniShopDisposingChecker; 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 java.awt.Container; +import java.awt.GraphicsEnvironment; +import java.awt.Rectangle; import java.awt.Window; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; @@ -36,10 +34,11 @@ public class MiniComponentShopDialog { final JFrame frame = new JFrame(); final MiniComponentShopPane shopPane = new MiniComponentShopPane(); - final UNIT width = FU.getInstance(900 * Constants.FU_PER_OLD_PIX); - final UNIT height = FU.getInstance(600 * Constants.FU_PER_OLD_PIX); - int resolution = ScreenResolution.getScreenResolution(); - frame.setSize(width.toPixI(resolution), height.toPixI(resolution)); + GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment(); + Rectangle rect =ge.getMaximumWindowBounds(); + int width = (int) (rect.width * 0.8); + int height = (int) (rect.height * 0.9); + frame.setSize(width, height); frame.setTitle(Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Window_Title")); frame.add(shopPane); frame.setResizable(false);