Browse Source

REPORT-85293【启动优化】起始页新增加载进度条视觉效果确认

全屏效果在 windows 上需要处理一下。
release/11.0
Harrison 2 years ago
parent
commit
1f23a69f41
  1. 18
      designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java

18
designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java

@ -11,12 +11,14 @@ import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.ui.util.UIUtil; import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.ColorUtils; import com.fr.design.utils.ColorUtils;
import com.fr.design.utils.ThemeUtils; import com.fr.design.utils.ThemeUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.exit.DesignerExiter; import com.fr.exit.DesignerExiter;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.collections.CollectionUtils; import com.fr.stable.collections.CollectionUtils;
import com.fr.stable.os.OperatingSystem;
import com.fr.start.common.DesignerStartupContext; import com.fr.start.common.DesignerStartupContext;
import com.fr.startup.metric.DesignerMetrics; import com.fr.startup.metric.DesignerMetrics;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -56,9 +58,6 @@ import java.util.Map;
**/ **/
public class StartupPageWindow extends JFrame { public class StartupPageWindow extends JFrame {
private static final int CONTENT_LAYER = 0;
private static final int TRANSPARENT_LAYER = 1;
private static final Color HOVER_COLOR = new Color(65, 155, 249); private static final Color HOVER_COLOR = new Color(65, 155, 249);
private static final Color SEP_COLOR = new Color(224, 224, 225); private static final Color SEP_COLOR = new Color(224, 224, 225);
@ -176,11 +175,18 @@ public class StartupPageWindow extends JFrame {
return headerPanel; return headerPanel;
} }
/**
* 1-mac启动时全屏
* 2-windows 则居中处理
*/
private void setFullScreen() { private void setFullScreen() {
Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); if (OperatingSystem.isMacos()) {
this.setLocation(0, 0); this.setLocation(0, 0);
this.setSize(screenSize.width, screenSize.height); this.setSize(SCREEN_SIZE.width, SCREEN_SIZE.height);
} else {
GUICoreUtils.setWindowFullScreen(this);
}
} }
private void addDefaultListeners() { private void addDefaultListeners() {

Loading…
Cancel
Save