Browse Source

REPORT-61213 mac全屏下部分高亮元素位置有偏差

new-design
kuangshuai 3 years ago
parent
commit
0da2ff82ec
  1. 7
      designer-base/src/main/java/com/fr/design/mainframe/guide/base/GuideView.java
  2. 5
      designer-base/src/main/java/com/fr/design/mainframe/guide/scene/AbstractGuideScene.java
  3. 4
      designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java

7
designer-base/src/main/java/com/fr/design/mainframe/guide/base/GuideView.java

@ -85,7 +85,12 @@ public class GuideView extends JDialog {
updateGuideViewLocation();
this.setVisible(true);
if (scene != null) {
scene.start();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
scene.start();
}
});
} else {
GuideManager.getInstance().getCurrentGuide().complete();
}

5
designer-base/src/main/java/com/fr/design/mainframe/guide/scene/AbstractGuideScene.java

@ -396,8 +396,9 @@ public abstract class AbstractGuideScene extends JPanel implements GuideScene {
}
public void clear() {
targetList = new ArrayList<>();
highlightList = new ArrayList<>();
targetList.clear();
highlightList.clear();
pointsList.clear();
this.nextButton = null;
if (this.getComponentCount() > 0) {
this.removeAll();

4
designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java

@ -87,9 +87,11 @@ public class ChangeLayoutComponentGuide {
@Override
public boolean prepared() {
switchButton.getComponentPopupMenu().setVisible(true);
Rectangle popupBounds = GuideCreateUtils.getRelativeBounds(switchButton.getComponentPopupMenu(), switchButton,0, -switchButton.getComponentPopupMenu().getHeight());
switchButton.getComponentPopupMenu().show(scene.getContainer(), popupBounds.x, popupBounds.y);
scene.addCustomTarget(
GuideCreateUtils.createModalTarget(switchButton.getComponentPopupMenu()),
GuideCreateUtils.getRelativeBounds(switchButton.getComponentPopupMenu(), switchButton,0, -switchButton.getComponentPopupMenu().getHeight())
popupBounds
);
scene.addClickTarget(switchButton.getComponentPopupMenu().getComponent(1), ClickScene.ClickType.LEFT, true);
scene.addBubbleTip(Toolkit.i18nText("Fine-Design_Guide_Scene_F001002_Tip_Select_Fix_layout"), null, GuideTip.Direction.RIGHT, 0.5f, 0.8f);

Loading…
Cancel
Save