more on icons
This commit is contained in:
parent
f19e2d22ca
commit
aa58fb52fe
|
@ -3,6 +3,6 @@ package com.rusefi;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
public class rusEFIVersion {
|
public class rusEFIVersion {
|
||||||
public static final int CONSOLE_VERSION = 20200627;
|
public static final int CONSOLE_VERSION = 20200630;
|
||||||
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static com.rusefi.StartupFrame.setFrameIcon;
|
||||||
import static com.rusefi.rusEFIVersion.CONSOLE_VERSION;
|
import static com.rusefi.rusEFIVersion.CONSOLE_VERSION;
|
||||||
import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
||||||
|
|
||||||
|
@ -63,6 +64,7 @@ public class ConsoleUI {
|
||||||
this.port = port;
|
this.port = port;
|
||||||
mainFrame = new MainFrame(this, tabbedPane);
|
mainFrame = new MainFrame(this, tabbedPane);
|
||||||
ConsoleUI.staticFrame = mainFrame.getFrame().getFrame();
|
ConsoleUI.staticFrame = mainFrame.getFrame().getFrame();
|
||||||
|
setFrameIcon(ConsoleUI.staticFrame);
|
||||||
FileLog.MAIN.logLine("Console " + CONSOLE_VERSION);
|
FileLog.MAIN.logLine("Console " + CONSOLE_VERSION);
|
||||||
|
|
||||||
FileLog.MAIN.logLine("Hardware: " + FirmwareFlasher.getHardwareKind());
|
FileLog.MAIN.logLine("Hardware: " + FirmwareFlasher.getHardwareKind());
|
||||||
|
|
|
@ -199,6 +199,7 @@ public class StartupFrame {
|
||||||
content.add(rightPanel, BorderLayout.EAST);
|
content.add(rightPanel, BorderLayout.EAST);
|
||||||
frame.add(content);
|
frame.add(content);
|
||||||
frame.pack();
|
frame.pack();
|
||||||
|
setFrameIcon(frame);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
UiUtils.centerWindow(frame);
|
UiUtils.centerWindow(frame);
|
||||||
|
|
||||||
|
@ -209,6 +210,12 @@ public class StartupFrame {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setFrameIcon(Frame frame) {
|
||||||
|
ImageIcon icon = AutoupdateUtil.loadIcon(LOGO);
|
||||||
|
if (icon != null)
|
||||||
|
frame.setIconImage(icon.getImage());
|
||||||
|
}
|
||||||
|
|
||||||
public static JLabel createLogoLabel() {
|
public static JLabel createLogoLabel() {
|
||||||
ImageIcon logoIcon = AutoupdateUtil.loadIcon(LOGO);
|
ImageIcon logoIcon = AutoupdateUtil.loadIcon(LOGO);
|
||||||
if (logoIcon == null)
|
if (logoIcon == null)
|
||||||
|
|
Loading…
Reference in New Issue