Update src/main/java/dev/sillyangel/calc/Calculator.java
All checks were successful
Build the Jar / build (push) Successful in 7s

This commit is contained in:
2025-12-16 14:01:08 -06:00
parent cdc05c9b67
commit c8aa7a9648

View File

@@ -16,10 +16,12 @@ import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.*;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.util.SystemInfo;
import dev.sillyangel.calc.themes.*;
import dev.sillyangel.calc.CalculatorModes;
public class Calculator extends JFrame implements KeyListener {
public static String APPILCATION_VERSION = "1.0.0pre";
@@ -50,6 +52,14 @@ public class Calculator extends JFrame implements KeyListener {
System.out.println("\nangel's awesome calculator (acc) " + Calculator.getVersion());
System.out.println("created by angel");
System.out.println("---------------------------------");
if( SystemInfo.isMacOS ) {
System.setProperty( "apple.laf.useScreenMenuBar", "true" );
System.setProperty( "apple.awt.application.name", "Calculator" );
System.setProperty( "apple.awt.application.appearance", "system" );
}
if( SystemInfo.isLinux ) { // why is linux different
JFrame.setDefaultLookAndFeelDecorated(true);
}
try {
// UIManager.setLookAndFeel("com.formdev.flatlaf.themes.FlatMacDarkLaf");
@@ -474,6 +484,7 @@ public class Calculator extends JFrame implements KeyListener {
}
private void PreferencesAction() {
System.out.println("preferences panel are open");
}
private void aboutActionPerformed() {
JLabel titleLabel = new JLabel( "Angel's Awesome Calculator" );