refactoring

This commit is contained in:
rusefillc 2023-09-26 23:17:08 -04:00
parent 4e4caa5d65
commit 4b66100202
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package com.rusefi.ui;
import com.rusefi.core.io.BundleUtil; import com.rusefi.core.io.BundleUtil;
import com.rusefi.core.ui.AutoupdateUtil; import com.rusefi.core.ui.AutoupdateUtil;
import com.rusefi.ui.util.URLLabel; import com.rusefi.ui.util.URLLabel;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import javax.swing.*; import javax.swing.*;
@ -43,4 +44,9 @@ public class LogoHelper {
} }
return AutoupdateUtil.loadIcon(logoName); return AutoupdateUtil.loadIcon(logoName);
} }
@NotNull
public static URLLabel createUrlLabel() {
return new URLLabel(LINK_TEXT, URI);
}
} }

View File

@ -212,7 +212,7 @@ public class StartupFrame {
JLabel logo = LogoHelper.createLogoLabel(); JLabel logo = LogoHelper.createLogoLabel();
if (logo != null) if (logo != null)
rightPanel.add(logo); rightPanel.add(logo);
rightPanel.add(new URLLabel(LogoHelper.LINK_TEXT, LogoHelper.URI)); rightPanel.add(LogoHelper.createUrlLabel());
rightPanel.add(new JLabel("Version " + Launcher.CONSOLE_VERSION)); rightPanel.add(new JLabel("Version " + Launcher.CONSOLE_VERSION));
JPanel content = new JPanel(new BorderLayout()); JPanel content = new JPanel(new BorderLayout());