张世豪
2025-12-12 4dd7a3a44f8c3d0bc658b8e3ac4ab84378551a55
src/baseStation/BaseStationDialog.java
@@ -16,6 +16,8 @@
import java.util.Locale;
import java.util.Properties;
import zhuye.buttonset;
public class BaseStationDialog extends JDialog {
    private final Color THEME_COLOR;
    private final Device device;
@@ -296,7 +298,7 @@
        titleLabel.setFont(new Font("微软雅黑", Font.BOLD, 14));
        titleLabel.setForeground(Color.DARK_GRAY);
        JButton actionButton = createInlineButton(buttonText, buttonColor);
        JButton actionButton = buttonset.createStyledButton(buttonText, buttonColor);
        actionButton.addActionListener(actionListener);
        panel.add(titleLabel);
@@ -305,30 +307,6 @@
        return panel;
    }
    private JButton createInlineButton(String text, Color bgColor) {
        JButton button = new JButton(text);
        button.setFont(new Font("微软雅黑", Font.BOLD, 14));
        button.setBackground(bgColor);
        button.setForeground(Color.WHITE);
        button.setFocusPainted(false);
        button.setBorder(BorderFactory.createEmptyBorder(8, 18, 8, 18));
        Dimension size = new Dimension(90, 36);
        button.setPreferredSize(size);
        button.setMinimumSize(size);
        button.setMaximumSize(size);
        button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                button.setBackground(brightenColor(bgColor));
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                button.setBackground(bgColor);
            }
        });
        return button;
    }
    
    private Color brightenColor(Color color) {
        int r = Math.min(255, color.getRed() + 30);