Browse Source

Pull request #8682: REPORT-70475 新旧fm切换 悬浮按钮丢失 && REPORT-70463 搜索框键入文本后界面闪烁

Merge in DESIGN/design from ~HADES/design:feature/x to feature/x

* commit '4313157f8fb11d689f72d054a1479e616fdee063':
  REPORT-70463 搜索框键入文本后界面闪烁
  REPORT-70475 新旧fm切换 悬浮按钮丢失
feature/x
Hades 3 years ago
parent
commit
642dee1ad9
  1. 3
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java
  2. 9
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java
  3. 17
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java

3
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java

@ -511,7 +511,8 @@ public class AlphaFineFrame extends JFrame {
private void startSearchTextFieldTimer() {
Timer timer = new Timer(TIMER_DELAY, e -> {
if (StringUtils.isEmpty(searchTextField.getText())) {
// 坑 isShowing返回false 即使textField有内容 getText返回的也是空
if (searchTextField.isShowing() && StringUtils.isEmpty(searchTextField.getText())) {
SearchTooltipPopup.getInstance().hide();
switchType(selectedType);
}

9
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java

@ -23,12 +23,8 @@ public class QuestionPane extends JPanel {
private static final Image QUESTION_BACKGROUND_IMAGE = SVGLoader.load("/com/fr/design/mainframe/alphafine/images/groupbackgroud.svg");
/**
* 是否全部已读
*/
private boolean hasRead;
public QuestionPane(boolean hasRead) {
public QuestionPane() {
this.setBackground(new Color(0, 0, 0, 0));
}
@ -47,9 +43,6 @@ public class QuestionPane extends JPanel {
}
public void setHasRead(boolean hasRead) {
this.hasRead = hasRead;
}
@Override
public Dimension getPreferredSize() {

17
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java

@ -20,7 +20,7 @@ import javax.swing.JWindow;
public class QuestionWindow extends JWindow {
private static final QuestionWindow INSTANCE = new QuestionWindow();
private final QuestionPane questionPane = new QuestionPane(true);
private final QuestionPane questionPane = new QuestionPane();
private int pressX;
private int pressY;
private QuestionWindow() {
@ -62,6 +62,8 @@ public class QuestionWindow extends JWindow {
this.getLayeredPane().setToolTipText(Toolkit.i18nText("Fine-Design_Report_AlphaFine_Learn_More_About"));
this.setContentPane(questionPane);
this.setSize(new Dimension(40, 40));
// 这个地方可以设置alwaysOnTop 弹窗会跟随主页面失去激活状态而隐藏 不会与其他弹窗冲突
this.setAlwaysOnTop(true);
this.setLocation(DesignerContext.getDesignerFrame().getWidth() - 100,
DesignerContext.getDesignerFrame().getHeight() - 100);
}
@ -70,17 +72,4 @@ public class QuestionWindow extends JWindow {
return INSTANCE;
}
public void setHasRead(boolean hasRead) {
this.questionPane.setHasRead(hasRead);
}
@Override
public void setVisible(boolean b) {
super.setVisible(b);
}
@Override
public void dispose() {
super.dispose();
}
}

Loading…
Cancel
Save