From a541fbdc8812337de120aad3792a2033a5dd7afe Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期四, 25 十二月 2025 12:23:01 +0800
Subject: [PATCH] 优化了首页
---
set.properties | 10 +++++-----
src/zhuye/Shouye.java | 26 +++++++++++++-------------
src/Mqttmessage/PushCallback.java | 2 +-
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/set.properties b/set.properties
index 09c043b..ed82d7f 100644
--- a/set.properties
+++ b/set.properties
@@ -1,5 +1,5 @@
-#Current work land selection updated
-#Wed Dec 24 18:54:38 CST 2025
+#Mower Configuration Properties - Updated
+#Thu Dec 25 12:21:15 CST 2025
appVersion=-1
boundaryLengthVisible=false
currentWorkLandNumber=LAND1
@@ -8,12 +8,12 @@
handheldMarkerId=1872
idleTrailDurationSeconds=60
manualBoundaryDrawingMode=false
-mapScale=1.34
+mapScale=0.78
measurementModeEnabled=false
mowerId=6258
serialAutoConnect=true
serialBaudRate=115200
serialPortName=COM15
simCardNumber=-1
-viewCenterX=-195.34
-viewCenterY=432.68
+viewCenterX=-148.00
+viewCenterY=424.51
diff --git a/src/Mqttmessage/PushCallback.java b/src/Mqttmessage/PushCallback.java
index 12d7467..0d646dc 100644
--- a/src/Mqttmessage/PushCallback.java
+++ b/src/Mqttmessage/PushCallback.java
@@ -13,7 +13,7 @@
public void connectionLost(Throwable cause) {
// 杩炴帴涓㈠け鍚庯紝涓�鑸湪杩欓噷闈㈣繘琛岄噸杩�
- System.out.println("杩炴帴鏂紑锛屽彲浠ュ仛閲嶈繛");
+ Client.lianjiemqqt();
}
diff --git a/src/zhuye/Shouye.java b/src/zhuye/Shouye.java
index f7da141..9d87cf7 100644
--- a/src/zhuye/Shouye.java
+++ b/src/zhuye/Shouye.java
@@ -843,7 +843,7 @@
try {
ImageIcon settingsIcon = new ImageIcon("image/sets.png");
// 璋冩暣鍥剧墖澶у皬浠ラ�傚簲鎸夐挳
- Image scaledImage = settingsIcon.getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH);
+ Image scaledImage = settingsIcon.getImage().getScaledInstance(25, 25, Image.SCALE_SMOOTH);
settingsBtn.setIcon(new ImageIcon(scaledImage));
} catch (Exception e) {
// 濡傛灉鍥剧墖鍔犺浇澶辫触锛屼娇鐢ㄩ粯璁ゆ枃鏈�
@@ -1209,15 +1209,15 @@
controlPanel = new JPanel(new BorderLayout());
controlPanel.setBackground(PANEL_BACKGROUND);
controlPanel.setBorder(BorderFactory.createEmptyBorder(15, 20, 15, 20));
- controlPanel.setPreferredSize(new Dimension(0, 100));
+ controlPanel.setPreferredSize(new Dimension(0, 80));
JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 20, 0));
buttonPanel.setBackground(PANEL_BACKGROUND);
- startBtn = createControlButton("鏆傚仠", THEME_COLOR);
+ startBtn = createControlButton("鏆傚仠鍓茶崏", THEME_COLOR);
updateStartButtonAppearance();
- stopBtn = createControlButton("缁撴潫", Color.ORANGE);
+ stopBtn = createControlButton("缁撴潫鍓茶崏", Color.ORANGE);
updateStopButtonIcon();
buttonPanel.add(startBtn);
@@ -1323,7 +1323,8 @@
button.setFont(new Font("寰蒋闆呴粦", Font.BOLD, 16));
button.setBackground(color);
button.setForeground(Color.WHITE);
- button.setBorder(BorderFactory.createEmptyBorder(15, 0, 15, 0));
+ button.setPreferredSize(new Dimension(0, 50));
+ button.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
button.setFocusPainted(false);
// 鎮仠鏁堟灉
@@ -2127,7 +2128,7 @@
updateStartButtonAppearance();
}
if (stopBtn != null) {
- stopBtn.setText("缁撴潫");
+ stopBtn.setText("缁撴潫鍓茶崏");
updateStopButtonIcon();
}
if (statusLabel != null) {
@@ -2170,17 +2171,16 @@
if (startBtn == null) {
return;
}
- String iconPath = startButtonShowingPause ? "image/start0.png" : "image/start1.png";
- startBtn.setText(startButtonShowingPause ? "鏆傚仠" : "寮�濮�");
- applyButtonIcon(startBtn, iconPath);
+ startBtn.setText(startButtonShowingPause ? "鏆傚仠鍓茶崏" : "寮�濮嬪壊鑽�");
+ startBtn.setIcon(null);
}
private void updateStopButtonIcon() {
if (stopBtn == null) {
return;
}
- String iconPath = stopButtonActive ? "image/stop1.png" : "image/stop0.png";
- applyButtonIcon(stopBtn, iconPath);
+ stopBtn.setText("缁撴潫鍓茶崏");
+ stopBtn.setIcon(null);
}
private void toggleBluetoothConnection() {
@@ -2995,10 +2995,10 @@
private void ensureBluetoothIconsLoaded() {
if (bluetoothIcon == null) {
- bluetoothIcon = loadScaledIcon("image/blue.png", 28, 28);
+ bluetoothIcon = loadScaledIcon("image/blue.png", 25, 25);
}
if (bluetoothLinkedIcon == null) {
- bluetoothLinkedIcon = loadScaledIcon("image/bluelink.png", 28, 28);
+ bluetoothLinkedIcon = loadScaledIcon("image/bluelink.png", 25, 25);
}
}
--
Gitblit v1.10.0