Browse Source

Pull request #12109: REPORT-95362 fix:tab上的toolTip被截断 && REPORT-95367 fix:关闭icon模糊

Merge in DESIGN/design from ~CARLSON/design:release/11.0 to release/11.0

* commit 'ccb79d4c49f6dfce1542bb9bffb425d969d7b23d':
  REPORT-95367 fix:关闭icon模糊
  REPORT-95362 fix:tab上的toolTip被截断
newui
Carlson-洪金阳 2 years ago
parent
commit
893d7b8f13
  1. 8
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabMenuFactory.java
  2. 8
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java

8
designer-base/src/main/java/com/fr/design/file/MultiTemplateTabMenuFactory.java

@ -1,5 +1,6 @@
package com.fr.design.file;
import com.fr.base.svg.IconUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.imenu.UIMenuItem;
@ -7,7 +8,6 @@ import com.fr.design.gui.imenu.UIScrollPopUpMenu;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.utils.TemplateUtils;
import com.fr.general.IOUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.collections.CollectionUtils;
@ -34,9 +34,9 @@ import java.util.Map;
**/
public class MultiTemplateTabMenuFactory {
private static final Icon CLOSE = IOUtils.readIcon("/com/fr/design/images/buttonicon/close_icon.png");
private static final Icon MOUSE_OVER_CLOSE = IOUtils.readIcon("/com/fr/design/images/buttonicon/mouseoverclose icon.png");
private static final Icon MOUSE_PRESS_CLOSE = IOUtils.readIcon("/com/fr/design/images/buttonicon/pressclose icon.png");
private static final Icon CLOSE = IconUtils.readIcon("/com/fr/design/standard/close/close");
private static final Icon MOUSE_OVER_CLOSE = IconUtils.readIcon("/com/fr/design/standard/close/close_mouseover.svg");
private static final Icon MOUSE_PRESS_CLOSE = IconUtils.readIcon("/com/fr/design/standard/close/close_press.svg");
private static final int ITEM_SIZE = 25;

8
designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java

@ -44,6 +44,7 @@ import javax.swing.JSeparator;
import javax.swing.MenuElement;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.ToolTipManager;
import javax.swing.plaf.basic.BasicMenuItemUI;
import java.awt.AWTEvent;
import java.awt.AlphaComposite;
@ -1153,6 +1154,7 @@ public class MultiTemplateTabPane extends JComponent {
private class MultiTemplateTabMouseListener implements MouseListener {
private boolean oldLightWeightPopupEnabled;
/**
* 鼠标进入
@ -1161,7 +1163,8 @@ public class MultiTemplateTabPane extends JComponent {
*/
@Override
public void mouseEntered(MouseEvent e) {
// do nothing
this.oldLightWeightPopupEnabled = ToolTipManager.sharedInstance().isLightWeightPopupEnabled();
ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
}
/**
@ -1171,6 +1174,9 @@ public class MultiTemplateTabPane extends JComponent {
*/
@Override
public void mouseExited(MouseEvent e) {
ToolTipManager.sharedInstance().setEnabled(false);
ToolTipManager.sharedInstance().setEnabled(true);
ToolTipManager.sharedInstance().setLightWeightPopupEnabled(this.oldLightWeightPopupEnabled);
listDownMode = LIST_DOWN;
closeIconIndex = -1;
mouseOveredIndex = -1;

Loading…
Cancel
Save