Browse Source

REPORT-61306 设计器缩放时,显示通知的弹窗未跟随设计器内部界面,而是固定显示在右侧

zheng-1641779399395
pengda 3 years ago
parent
commit
9df5abe79c
  1. 5
      designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java

5
designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java

@ -2,6 +2,7 @@ package com.fr.design.notification.ui;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.notification.Notification;
import com.fr.design.notification.NotificationCenter;
import java.awt.BorderLayout;
@ -119,7 +120,7 @@ public class NotificationCenterDialog extends JDialog {
if (winSize.width > screenSize.width) {
winSize.width = screenSize.width;
}
//这里设置位置:水平居中,竖直偏上
win.setLocation(screenSize.width - winSize.width - 90, 50);
win.setLocation((DesignerContext.getDesignerFrame().getWidth() - winSize.width - 100 + DesignerContext.getDesignerFrame().getX()),
DesignerContext.getDesignerFrame().getY() + winSize.height);
}
}

Loading…
Cancel
Save