diff --git a/pom.xml b/pom.xml
index 2bee1d1..f771a58 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.luoboduner.moo.info
MooInfo
- 1.1.2
+ 1.1.3
jar
MooInfo
@@ -15,22 +15,22 @@
UTF-8
UTF-8
- 1.8
- 1.8
+ 17
+ 17
- 1.2.10
+ 1.4.5
7.0.3
- 1.18.22
- 5.8.2
+ 1.18.24
+ 5.9.1
3.12.0
- 31.0.1-jre
- 4.9.3
- 2.1
- 2.1
- 2.1
- 5.7.21
- 1.2.79
- 6.1.5
+ 31.1-jre
+ 4.10.0
+ 3.1.1
+ 3.1.1
+ 3.1.1
+ 5.8.11
+ 2.0.22
+ 6.4.4
1.5.3
@@ -78,12 +78,12 @@
com.squareup.okhttp3
okhttp
${okhttp.version}
-
-
- kotlin-stdlib
- org.jetbrains.kotlin
-
-
+
+
+
+
+
+
@@ -134,55 +134,57 @@
io.github.fvarrui
javapackager
- 1.6.5
+ 1.7.2
true
com.luoboduner.moo.info.App
true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- bundling-for-linux
- package
-
- package
-
-
- linux
- true
-
-
-
+
+ bundling-for-windows
+ package
+
+ package
+
+
+ windows
+ true
+ jdk.crypto.ec
+
+
+
+
+ true
+ true
+ true
+
+
+ installForAllUsers
+ true
+ false
+ false
+ true
+
+ compiler:Default.isl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -192,6 +194,7 @@
+
diff --git a/src/main/java/com/luoboduner/moo/info/App.java b/src/main/java/com/luoboduner/moo/info/App.java
index 0dfb849..6101c4a 100644
--- a/src/main/java/com/luoboduner/moo/info/App.java
+++ b/src/main/java/com/luoboduner/moo/info/App.java
@@ -42,9 +42,7 @@ public static void main(String[] args) {
System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("apple.awt.application.name", "MooInfo");
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "MooInfo");
- if (UIUtil.isDarkLaf()) {
- System.setProperty("apple.awt.application.appearance", "system");
- }
+ System.setProperty("apple.awt.application.appearance", "system");
FlatDesktop.setAboutHandler(() -> {
try {
@@ -73,8 +71,8 @@ public static void main(String[] args) {
Init.initTheme();
// install inspectors
- FlatInspector.install( "ctrl shift alt X" );
- FlatUIDefaultsInspector.install( "ctrl shift alt Y" );
+ FlatInspector.install("ctrl shift alt X");
+ FlatUIDefaultsInspector.install("ctrl shift alt Y");
mainFrame = new MainFrame();
mainFrame.init();
diff --git a/src/main/java/com/luoboduner/moo/info/ui/Init.java b/src/main/java/com/luoboduner/moo/info/ui/Init.java
index bb665e8..755c947 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/Init.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/Init.java
@@ -3,11 +3,14 @@
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;
-import com.formdev.flatlaf.*;
+import com.formdev.flatlaf.FlatDarculaLaf;
+import com.formdev.flatlaf.FlatDarkLaf;
+import com.formdev.flatlaf.FlatIntelliJLaf;
+import com.formdev.flatlaf.FlatLightLaf;
import com.formdev.flatlaf.extras.FlatSVGIcon;
-import com.formdev.flatlaf.intellijthemes.FlatCyanLightIJTheme;
-import com.formdev.flatlaf.intellijthemes.FlatDarkPurpleIJTheme;
-import com.formdev.flatlaf.intellijthemes.FlatLightFlatIJTheme;
+import com.formdev.flatlaf.intellijthemes.*;
+import com.formdev.flatlaf.themes.FlatMacDarkLaf;
+import com.formdev.flatlaf.themes.FlatMacLightLaf;
import com.luoboduner.moo.info.App;
import com.luoboduner.moo.info.ui.component.TopMenuBar;
import com.luoboduner.moo.info.ui.form.*;
@@ -111,7 +114,18 @@ public static void initTheme() {
case "IntelliJ Light":
FlatLightFlatIJTheme.setup();
break;
-
+ case "Xcode-Dark":
+ FlatXcodeDarkIJTheme.setup();
+ break;
+ case "Vuesion":
+ FlatVuesionIJTheme.setup();
+ break;
+ case "Flat macOS Light":
+ FlatMacLightLaf.setup();
+ break;
+ case "Flat macOS Dark":
+ FlatMacDarkLaf.setup();
+ break;
default:
FlatDarculaLaf.setup();
}
diff --git a/src/main/java/com/luoboduner/moo/info/ui/UiConsts.java b/src/main/java/com/luoboduner/moo/info/ui/UiConsts.java
index 38aa068..d365e66 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/UiConsts.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/UiConsts.java
@@ -11,7 +11,7 @@
public class UiConsts {
public static final String APP_NAME = "MooInfo";
- public static final String APP_VERSION = "1.1.2";
+ public static final String APP_VERSION = "1.1.3";
public static final int TABLE_ROW_HEIGHT = 36;
diff --git a/src/main/java/com/luoboduner/moo/info/ui/component/TopMenuBar.java b/src/main/java/com/luoboduner/moo/info/ui/component/TopMenuBar.java
index 82abc33..8ab0e09 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/component/TopMenuBar.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/component/TopMenuBar.java
@@ -53,7 +53,11 @@ public class TopMenuBar extends JMenuBar {
"Flat Darcula(Recommended)",
"Dark purple",
"IntelliJ Cyan",
- "IntelliJ Light"};
+ "IntelliJ Light",
+ "Xcode-Dark",
+ "Vuesion",
+ "Flat macOS Light",
+ "Flat macOS Dark"};
private static String[] fontNames = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
diff --git a/src/main/java/com/luoboduner/moo/info/ui/dialog/AboutDialog.form b/src/main/java/com/luoboduner/moo/info/ui/dialog/AboutDialog.form
index 5643344..8d0dd79 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/dialog/AboutDialog.form
+++ b/src/main/java/com/luoboduner/moo/info/ui/dialog/AboutDialog.form
@@ -16,7 +16,7 @@
-
+
diff --git a/src/main/java/com/luoboduner/moo/info/ui/dialog/AboutDialog.java b/src/main/java/com/luoboduner/moo/info/ui/dialog/AboutDialog.java
index 876a558..57ea3ba 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/dialog/AboutDialog.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/dialog/AboutDialog.java
@@ -2,6 +2,7 @@
import cn.hutool.core.thread.ThreadUtil;
import com.formdev.flatlaf.extras.FlatSVGIcon;
+import com.formdev.flatlaf.util.SystemInfo;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.Spacer;
@@ -9,6 +10,7 @@
import com.luoboduner.moo.info.ui.UiConsts;
import com.luoboduner.moo.info.util.ComponentUtil;
import com.luoboduner.moo.info.util.ScrollUtil;
+import com.luoboduner.moo.info.util.SystemUtil;
import com.luoboduner.moo.info.util.UpgradeUtil;
import javax.swing.*;
@@ -47,6 +49,15 @@ public AboutDialog() {
setContentPane(contentPane);
setModal(true);
+ if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
+ this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
+ this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
+ this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
+ this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
+ GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
+ gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
+ }
+
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
addWindowListener(new WindowAdapter() {
@Override
@@ -359,7 +370,7 @@ private void onOK() {
contentPane.add(scrollPane, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
scrollPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
final JPanel panel1 = new JPanel();
- panel1.setLayout(new GridLayoutManager(9, 2, new Insets(0, 0, 0, 0), -1, -1));
+ panel1.setLayout(new GridLayoutManager(9, 2, new Insets(10, 10, 0, 0), -1, -1));
scrollPane.setViewportView(panel1);
panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
logoLabel = new JLabel();
diff --git a/src/main/java/com/luoboduner/moo/info/ui/dialog/SettingDialog.java b/src/main/java/com/luoboduner/moo/info/ui/dialog/SettingDialog.java
index 1e5a0c2..abaafe5 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/dialog/SettingDialog.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/dialog/SettingDialog.java
@@ -2,12 +2,14 @@
import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;
+import com.formdev.flatlaf.util.SystemInfo;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.Spacer;
import com.luoboduner.moo.info.App;
import com.luoboduner.moo.info.util.ComponentUtil;
import com.luoboduner.moo.info.util.ScrollUtil;
+import com.luoboduner.moo.info.util.SystemUtil;
import javax.swing.*;
import javax.swing.border.TitledBorder;
@@ -35,6 +37,15 @@ public SettingDialog() {
setContentPane(contentPane);
setModal(true);
+ if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
+ this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
+ this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
+ this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
+ this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
+ GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
+ gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
+ }
+
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
addWindowListener(new WindowAdapter() {
@Override
diff --git a/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemEnvResultDialog.form b/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemEnvResultDialog.form
index bba7a4c..bd60337 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemEnvResultDialog.form
+++ b/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemEnvResultDialog.form
@@ -9,7 +9,7 @@
-
+
diff --git a/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemEnvResultDialog.java b/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemEnvResultDialog.java
index 1c8fcd4..713d277 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemEnvResultDialog.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemEnvResultDialog.java
@@ -1,10 +1,12 @@
package com.luoboduner.moo.info.ui.dialog;
+import com.formdev.flatlaf.util.SystemInfo;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.Spacer;
import com.luoboduner.moo.info.App;
import com.luoboduner.moo.info.util.ComponentUtil;
+import com.luoboduner.moo.info.util.SystemUtil;
import javax.swing.*;
import javax.swing.border.TitledBorder;
@@ -26,6 +28,15 @@ public SystemEnvResultDialog() {
setModal(true);
getRootPane().setDefaultButton(buttonOK);
+ if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
+ this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
+ this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
+ this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
+ this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
+ GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
+ gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
+ }
+
buttonOK.addActionListener(e -> onOK());
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
@@ -73,7 +84,7 @@ public void appendTextArea(String str) {
contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
final JPanel panel1 = new JPanel();
- panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
+ panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 10, 10), -1, -1));
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
final Spacer spacer1 = new Spacer();
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
diff --git a/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemInfoTestDialog.form b/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemInfoTestDialog.form
index 367eb42..5834343 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemInfoTestDialog.form
+++ b/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemInfoTestDialog.form
@@ -9,7 +9,7 @@
-
+
diff --git a/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemInfoTestDialog.java b/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemInfoTestDialog.java
index 1b83ea5..23a028f 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemInfoTestDialog.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/dialog/SystemInfoTestDialog.java
@@ -9,6 +9,7 @@
import com.luoboduner.moo.info.App;
import com.luoboduner.moo.info.util.ComponentUtil;
import com.luoboduner.moo.info.util.ConsoleUtil;
+import com.luoboduner.moo.info.util.SystemUtil;
import oshi.SystemInfo;
import oshi.hardware.*;
import oshi.software.os.*;
@@ -38,6 +39,15 @@ public SystemInfoTestDialog() {
setModal(true);
getRootPane().setDefaultButton(buttonOK);
+ if (SystemUtil.isMacOs() && com.formdev.flatlaf.util.SystemInfo.isMacFullWindowContentSupported) {
+ this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
+ this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
+ this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
+ this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
+ GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
+ gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
+ }
+
buttonOK.addActionListener(e -> onOK());
buttonCancel.addActionListener(e -> onCancel());
@@ -420,7 +430,7 @@ private void printGraphicsCards(List list) {
contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
final JPanel panel1 = new JPanel();
- panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
+ panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 10, 10), -1, -1));
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
final Spacer spacer1 = new Spacer();
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
diff --git a/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateDialog.form b/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateDialog.form
index 6180000..0f7220f 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateDialog.form
+++ b/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateDialog.form
@@ -9,7 +9,7 @@
-
+
diff --git a/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateDialog.java b/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateDialog.java
index 9a7dfb6..e800a14 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateDialog.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateDialog.java
@@ -4,11 +4,13 @@
import cn.hutool.core.io.StreamProgress;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.http.HttpUtil;
+import com.formdev.flatlaf.util.SystemInfo;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.Spacer;
import com.luoboduner.moo.info.App;
import com.luoboduner.moo.info.util.ComponentUtil;
+import com.luoboduner.moo.info.util.SystemUtil;
import javax.swing.*;
import java.awt.*;
@@ -44,6 +46,15 @@ public UpdateDialog() {
setModal(true);
getRootPane().setDefaultButton(buttonOK);
+ if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
+ this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
+ this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
+ this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
+ this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
+ GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
+ gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
+ }
+
ComponentUtil.setPreferSizeAndLocateToCenter(this, 600, 200);
buttonOK.addActionListener(e -> onOK());
@@ -102,7 +113,7 @@ public void start() {
}
@Override
- public void progress(long progressSize) {
+ public void progress(long progressSize, long totalSize) {
progressBarDownload.setValue((int) progressSize);
statusLabel.setText("Already download:" + FileUtil.readableFileSize(progressSize));
}
@@ -150,7 +161,7 @@ private void onCancel() {
contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
final JPanel panel1 = new JPanel();
- panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
+ panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 10, 10), -1, -1));
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
final Spacer spacer1 = new Spacer();
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
diff --git a/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateInfoDialog.form b/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateInfoDialog.form
index f0bbc7a..1a1df6a 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateInfoDialog.form
+++ b/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateInfoDialog.form
@@ -9,7 +9,7 @@
-
+
@@ -55,7 +55,7 @@
-
+
diff --git a/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateInfoDialog.java b/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateInfoDialog.java
index d3cdd68..23ed190 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateInfoDialog.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/dialog/UpdateInfoDialog.java
@@ -1,5 +1,6 @@
package com.luoboduner.moo.info.ui.dialog;
+import com.formdev.flatlaf.util.SystemInfo;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.Spacer;
@@ -46,6 +47,15 @@ public UpdateInfoDialog() {
setModal(true);
getRootPane().setDefaultButton(buttonOK);
+ if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
+ this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
+ this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
+ this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
+ this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
+ GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
+ gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
+ }
+
ComponentUtil.setPreferSizeAndLocateToCenter(this, 0.4, 0.64);
buttonOK.addActionListener(e -> onOK());
@@ -121,7 +131,7 @@ public void setHtmlText(String htmlText) {
contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 10, 0), -1, -1));
final JPanel panel1 = new JPanel();
- panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
+ panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 10, 0), -1, -1));
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
final Spacer spacer1 = new Spacer();
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
@@ -137,7 +147,7 @@ public void setHtmlText(String htmlText) {
final Spacer spacer2 = new Spacer();
panel1.add(spacer2, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
final JPanel panel3 = new JPanel();
- panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
+ panel3.setLayout(new GridLayoutManager(1, 1, new Insets(10, 0, 0, 0), -1, -1));
contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
final JScrollPane scrollPane1 = new JScrollPane();
panel3.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
diff --git a/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.java b/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.java
index 98e1ac7..a87d253 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.java
@@ -1,7 +1,9 @@
package com.luoboduner.moo.info.ui.form;
+import com.formdev.flatlaf.util.SystemInfo;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
+import com.luoboduner.moo.info.util.SystemUtil;
import lombok.Getter;
import javax.swing.*;
@@ -44,6 +46,11 @@ public static MainWindow getInstance() {
public void init() {
mainWindow = getInstance();
+ if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
+ GridLayoutManager gridLayoutManager = (GridLayoutManager) mainPanel.getLayout();
+ gridLayoutManager.setMargin(new Insets(20, 0, 0, 0));
+ }
+
mainWindow.getOverviewPanel().add(OverviewForm.getInstance().getMainPanel(), gridConstraints);
mainWindow.getDetailPanel().add(DetailForm.getInstance().getMainPanel(), gridConstraints);
mainWindow.getMemoryPanel().add(MemoryForm.getInstance().getMainPanel(), gridConstraints);
diff --git a/src/main/java/com/luoboduner/moo/info/ui/frame/MainFrame.java b/src/main/java/com/luoboduner/moo/info/ui/frame/MainFrame.java
index 1ff4afb..fb06a93 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/frame/MainFrame.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/frame/MainFrame.java
@@ -1,10 +1,12 @@
package com.luoboduner.moo.info.ui.frame;
import com.formdev.flatlaf.extras.FlatSVGUtils;
+import com.formdev.flatlaf.util.SystemInfo;
import com.luoboduner.moo.info.ui.UiConsts;
import com.luoboduner.moo.info.ui.component.TopMenuBar;
import com.luoboduner.moo.info.ui.listener.FrameListener;
import com.luoboduner.moo.info.util.ComponentUtil;
+import com.luoboduner.moo.info.util.SystemUtil;
import javax.swing.*;
@@ -26,6 +28,13 @@ public void init() {
setJMenuBar(topMenuBar);
ComponentUtil.setPreferSizeAndLocateToCenter(this, 0.6, 0.8);
+ if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
+ this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
+ this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
+ this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
+ this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
+ }
+
FrameListener.addListeners();
}
diff --git a/src/main/resources/version_summary.json b/src/main/resources/version_summary.json
index 92c1e97..5a32b57 100644
--- a/src/main/resources/version_summary.json
+++ b/src/main/resources/version_summary.json
@@ -1,11 +1,12 @@
{
- "currentVersion": "1.1.2",
+ "currentVersion": "1.1.3",
"versionIndex": {
"0.0.0": "0",
"1.0.0": "1",
"1.1.0": "2",
"1.1.1": "3",
- "1.1.2": "4"
+ "1.1.2": "4",
+ "1.1.3": "5"
},
"versionDetailList": [
{
@@ -32,6 +33,11 @@
"version": "1.1.2",
"title": "update flatlaf to 2.1",
"log": "● update flatlaf to 2.1\n● update oshi-core to 6.1.5\n● optimization of cpu indicator\n● update dependencies\n"
+ },
+ {
+ "version": "1.1.3",
+ "title": "Optimize performance under macOS",
+ "log": "● Optimize performance under macOS\n● update oshi to 6.4.4\n● new theme:Flat macOS,Xcode-Dark,Vuesion\n● update dependencies\n"
}
]
}
\ No newline at end of file