Browse Source

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

final/11.0
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(); updateGuideViewLocation();
this.setVisible(true); this.setVisible(true);
if (scene != null) { if (scene != null) {
scene.start(); SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
scene.start();
}
});
} else { } else {
GuideManager.getInstance().getCurrentGuide().complete(); 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() { public void clear() {
targetList = new ArrayList<>(); targetList.clear();
highlightList = new ArrayList<>(); highlightList.clear();
pointsList.clear();
this.nextButton = null; this.nextButton = null;
if (this.getComponentCount() > 0) { if (this.getComponentCount() > 0) {
this.removeAll(); 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 @Override
public boolean prepared() { public boolean prepared() {
switchButton.getComponentPopupMenu().setVisible(true); 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( scene.addCustomTarget(
GuideCreateUtils.createModalTarget(switchButton.getComponentPopupMenu()), 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.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); scene.addBubbleTip(Toolkit.i18nText("Fine-Design_Guide_Scene_F001002_Tip_Select_Fix_layout"), null, GuideTip.Direction.RIGHT, 0.5f, 0.8f);

Loading…
Cancel
Save