|
|
|
@ -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<String> 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))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|