From a541fbdc8812337de120aad3792a2033a5dd7afe Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期四, 25 十二月 2025 12:23:01 +0800
Subject: [PATCH] 优化了首页
---
src/zhuye/Shouye.java | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
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