Skip to content

Commit

Permalink
Merge pull request #75 from rememberber/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rememberber authored Aug 22, 2023
2 parents c0d2e2f + 7986ff2 commit e329826
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 72 deletions.
6 changes: 3 additions & 3 deletions download_links.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"windows": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.4.6/MooTool-1.4.6-windows.exe",
"mac": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.4.6/MooTool_1.4.6.dmg",
"linux": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.4.6/MooTool_1.4.6.deb"
"windows": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.4.8/MooTool-1.4.8-windows.exe",
"mac": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.4.8/MooTool_1.4.8.dmg",
"linux": "https://gitee.com/zhoubochina/MooTool/releases/download/v1.4.8/MooTool_1.4.8.deb"
}
93 changes: 46 additions & 47 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.luoboduner.moo.tool</groupId>
<artifactId>MooTool</artifactId>
<version>1.4.7</version>
<version>1.4.8</version>
<packaging>jar</packaging>

<name>MooTool</name>
Expand All @@ -32,11 +32,11 @@
<guava.version>31.1-jre</guava.version>
<okhttp.version>4.10.0</okhttp.version>
<google.zxing.core.version>3.5.1</google.zxing.core.version>
<flatlaf.version>3.1.1</flatlaf.version>
<flatlaf-extras.version>3.1.1</flatlaf-extras.version>
<flatlaf-intellij-themes.version>3.1.1</flatlaf-intellij-themes.version>
<flatlaf.version>3.2</flatlaf.version>
<flatlaf-extras.version>3.2</flatlaf-extras.version>
<flatlaf-intellij-themes.version>3.2</flatlaf-intellij-themes.version>
<flatlaf-fonts-jetbrains-mono.version>2.242</flatlaf-fonts-jetbrains-mono.version>
<rsyntaxtextarea.version>3.3.3</rsyntaxtextarea.version>
<rsyntaxtextarea.version>3.3.4</rsyntaxtextarea.version>
<sql-formatter.version>2.0.3</sql-formatter.version>
<google-java-format.version>1.16.0</google-java-format.version>
</properties>
Expand Down Expand Up @@ -228,37 +228,37 @@
<vmArgs>--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</vmArgs>
</configuration>
<executions>
<!-- <execution>-->
<!-- <id>bundling-for-windows</id>-->
<!-- <phase>package</phase>-->
<!-- <goals>-->
<!-- <goal>package</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <platform>windows</platform>-->
<!-- <createZipball>true</createZipball>-->
<!-- <additionalModules>jdk.crypto.ec,jdk.charsets</additionalModules>-->
<!-- <administratorRequired>true</administratorRequired>-->
<!-- <winConfig>-->
<execution>
<id>bundling-for-windows</id>
<phase>package</phase>
<goals>
<goal>package</goal>
</goals>
<configuration>
<platform>windows</platform>
<createZipball>true</createZipball>
<additionalModules>jdk.crypto.ec,jdk.charsets</additionalModules>
<administratorRequired>true</administratorRequired>
<winConfig>

<!-- &lt;!&ndash; general properties &ndash;&gt;-->
<!-- <generateSetup>true</generateSetup>-->
<!-- <generateMsi>true</generateMsi>-->
<!-- <generateMsm>true</generateMsm>-->
<!-- general properties -->
<generateSetup>true</generateSetup>
<generateMsi>true</generateMsi>
<generateMsm>true</generateMsm>

<!-- &lt;!&ndash; setup generation properties &ndash;&gt;-->
<!-- <setupMode>installForAllUsers</setupMode>-->
<!-- <createDesktopIconTask>true</createDesktopIconTask>-->
<!-- <disableDirPage>false</disableDirPage>-->
<!-- <disableFinishedPage>false</disableFinishedPage>-->
<!-- <removeOldLibs>true</removeOldLibs>-->
<!-- <setupLanguages>-->
<!-- <english>compiler:Default.isl</english>-->
<!-- &lt;!&ndash; <spanish>compiler:Languages\Chinese.isl</spanish>&ndash;&gt;-->
<!-- </setupLanguages>-->
<!-- </winConfig>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- setup generation properties -->
<setupMode>installForAllUsers</setupMode>
<createDesktopIconTask>true</createDesktopIconTask>
<disableDirPage>false</disableDirPage>
<disableFinishedPage>false</disableFinishedPage>
<removeOldLibs>true</removeOldLibs>
<setupLanguages>
<english>compiler:Default.isl</english>
<!-- <spanish>compiler:Languages\Chinese.isl</spanish>-->
</setupLanguages>
</winConfig>
</configuration>
</execution>
<!-- <execution>-->
<!-- <id>bundling-for-linux</id>-->
<!-- <phase>package</phase>-->
Expand All @@ -271,19 +271,18 @@
<!-- <additionalModules>jdk.crypto.ec,jdk.charsets</additionalModules>-->
<!-- </configuration>-->
<!-- </execution>-->
<execution>
<id>bundling-for-mac</id>
<phase>package</phase>
<goals>
<goal>package</goal>
</goals>
<configuration>
<platform>mac</platform>
<createTarball>true</createTarball>
<additionalModules>jdk.crypto.ec,jdk.charsets</additionalModules>
<!-- <jdkPath>X:\\path\to\mac\jdk</jdkPath>-->
</configuration>
</execution>
<!-- <execution>-->
<!-- <id>bundling-for-mac</id>-->
<!-- <phase>package</phase>-->
<!-- <goals>-->
<!-- <goal>package</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <platform>mac</platform>-->
<!-- <createTarball>true</createTarball>-->
<!-- <additionalModules>jdk.crypto.ec,jdk.charsets</additionalModules>-->
<!-- </configuration>-->
<!-- </execution>-->
</executions>
</plugin>
</plugins>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/luoboduner/moo/tool/ui/UiConsts.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public class UiConsts {
* 软件名称,版本
*/
public static final String APP_NAME = "MooTool";
public static final String APP_VERSION = "v1.4.7";
public static final String APP_VERSION = "v1.4.8";

public static final int TABLE_ROW_HEIGHT = 36;
public static final int TABLE_ROW_HEIGHT = 30;

/**
* Logo-1024*1024
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.luoboduner.moo.tool.ui.dialog.UpdateDialog">
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/>
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="48" y="54" width="624" height="297"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<margin top="10" left="10" bottom="10" right="10"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
Expand Down Expand Up @@ -58,7 +58,7 @@
</children>
</grid>
<grid id="e3588" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<margin top="0" left="10" bottom="0" right="10"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ private void onCancel() {
*/
private void $$$setupUI$$$() {
contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -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(10, 10, 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));
Expand All @@ -202,7 +202,7 @@ private void onCancel() {
buttonDownloadFromWeb.setText("打开下载页面");
panel2.add(buttonDownloadFromWeb, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JPanel panel3 = new JPanel();
panel3.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));
panel3.setLayout(new GridLayoutManager(4, 1, new Insets(0, 10, 0, 10), -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));
progressBarDownload = new JProgressBar();
panel3.add(progressBarDownload, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.luoboduner.moo.tool.ui.dialog.UpdateInfoDialog">
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="10" right="0"/>
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="48" y="54" width="436" height="297"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<margin top="10" left="10" bottom="10" right="10"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
Expand Down Expand Up @@ -55,7 +55,7 @@
</children>
</grid>
<grid id="e3588" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<margin top="0" left="10" bottom="0" right="10"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ public void setHtmlText(String htmlText) {
*/
private void $$$setupUI$$$() {
contentPane = new JPanel();
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 10, 0), -1, -1));
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 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(10, 10, 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));
Expand All @@ -137,7 +137,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(0, 10, 0, 10), -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void init() {
mainWindow.getMainPanel().updateUI();
if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
GridLayoutManager gridLayoutManager = (GridLayoutManager) mainPanel.getLayout();
gridLayoutManager.setMargin(new Insets(20, 0, 0, 0));
gridLayoutManager.setMargin(new Insets(25, 0, 0, 0));
}
mainWindow.getTabbedPane().setIconAt(0, new FlatSVGIcon("icon/edit.svg"));
mainWindow.getTabbedPane().setIconAt(1, new FlatSVGIcon("icon/time.svg"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.luoboduner.moo.tool.util.SystemUtil;

import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyEvent;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
Expand Down Expand Up @@ -64,14 +65,15 @@ public void windowClosed(WindowEvent e) {

@Override
public void windowActivated(WindowEvent e) {

if (App.config.isDefaultMaxWindow()) {
// 低分辨率下自动最大化窗口
App.mainFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);
}
}
});

MainWindow.getInstance().getMainPanel().registerKeyboardAction(e -> {
App.mainFrame.setVisible(false);
saveBeforeExit();
}, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
MainWindow.getInstance().getMainPanel().registerKeyboardAction(e -> App.mainFrame.setExtendedState(Frame.ICONIFIED), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);

}

public static void saveBeforeExit() {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/luoboduner/moo/tool/util/ConfigUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ public void setTheme(String theme) {
public String getFont() {
if (SystemUtil.isLinuxOs()) {
return setting.getStr("font", "setting.appearance", "Noto Sans CJK HK");
} else if (SystemUtil.isMacOs()) {
return setting.getStr("font", "setting.appearance", "PingFang SC");
} else {
return setting.getStr("font", "setting.appearance", "微软雅黑");
}
Expand Down
Loading

0 comments on commit e329826

Please sign in to comment.