From 075e81a392afb39785e0e0ae30bae4da68adbc99 Mon Sep 17 00:00:00 2001 From: renekton Date: Tue, 6 Aug 2024 12:56:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=AE=A1=E7=90=86/?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7/?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5/=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/main/java/com/fr/design/menu/MenuDef.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java index 5d274dbed8..5322176019 100644 --- a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java +++ b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java @@ -1,6 +1,7 @@ package com.fr.design.menu; import com.fine.theme.icon.LazyIcon; +import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIStyle; import com.fr.base.svg.IconUtils; import com.fr.design.file.HistoryTemplateListCache; @@ -43,7 +44,7 @@ import static com.fine.theme.utils.FineUIStyle.setStyle; public class MenuDef extends ShortCut { private static final int MENU_DEFAULTWDITH = 156; - private static final int BLANK_WIDTH = 30; + private static final int BLANK_WIDTH = 18; private static final Set FORBIDDEN_SET = new HashSet<>(); @@ -565,7 +566,7 @@ public class MenuDef extends ShortCut { private void updatePopupMenuSize() { int preferredWidth = popupMenu.getPreferredSize().width - BLANK_WIDTH; // 减少行尾的空白部分 int popupMenuWidth = preferredWidth > MENU_DEFAULTWDITH ? preferredWidth : MENU_DEFAULTWDITH; - popupMenu.setPopupSize(new Dimension(popupMenuWidth, popupMenu.getPreferredSize().height)); + popupMenu.setPopupSize(FineUIScale.scale(new Dimension(popupMenuWidth, popupMenu.getPreferredSize().height))); } From ef597debb67892013eb9cc9627bc62b86af2b65c Mon Sep 17 00:00:00 2001 From: renekton Date: Tue, 6 Aug 2024 13:40:41 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=AE=A1=E7=90=86/?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7/?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5/=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/main/java/com/fr/design/menu/MenuDef.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java index 5322176019..03ffba8407 100644 --- a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java +++ b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java @@ -566,7 +566,7 @@ public class MenuDef extends ShortCut { private void updatePopupMenuSize() { int preferredWidth = popupMenu.getPreferredSize().width - BLANK_WIDTH; // 减少行尾的空白部分 int popupMenuWidth = preferredWidth > MENU_DEFAULTWDITH ? preferredWidth : MENU_DEFAULTWDITH; - popupMenu.setPopupSize(FineUIScale.scale(new Dimension(popupMenuWidth, popupMenu.getPreferredSize().height))); + popupMenu.setPopupSize(new Dimension(FineUIScale.scale(popupMenuWidth), popupMenu.getPreferredSize().height)); } From a0be138c916a3f207c86702d80e01dec71b180bb Mon Sep 17 00:00:00 2001 From: renekton Date: Tue, 6 Aug 2024 13:50:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=AE=A1=E7=90=86/?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7/?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5/=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/main/java/com/fr/design/menu/MenuDef.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java index 03ffba8407..3fece3b671 100644 --- a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java +++ b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java @@ -44,7 +44,7 @@ import static com.fine.theme.utils.FineUIStyle.setStyle; public class MenuDef extends ShortCut { private static final int MENU_DEFAULTWDITH = 156; - private static final int BLANK_WIDTH = 18; + private static final int BLANK_WIDTH = 22; private static final Set FORBIDDEN_SET = new HashSet<>(); @@ -566,7 +566,7 @@ public class MenuDef extends ShortCut { private void updatePopupMenuSize() { int preferredWidth = popupMenu.getPreferredSize().width - BLANK_WIDTH; // 减少行尾的空白部分 int popupMenuWidth = preferredWidth > MENU_DEFAULTWDITH ? preferredWidth : MENU_DEFAULTWDITH; - popupMenu.setPopupSize(new Dimension(FineUIScale.scale(popupMenuWidth), popupMenu.getPreferredSize().height)); + popupMenu.setPopupSize(new Dimension(popupMenuWidth, popupMenu.getPreferredSize().height)); }