This commit is contained in:
@@ -15,13 +15,16 @@ import javax.swing.LayoutStyle.ComponentPlacement;
|
|||||||
import javax.swing.GroupLayout;
|
import javax.swing.GroupLayout;
|
||||||
import javax.swing.GroupLayout.Alignment;
|
import javax.swing.GroupLayout.Alignment;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
import com.formdev.flatlaf.FlatDarculaLaf;
|
||||||
|
import com.formdev.flatlaf.FlatIntelliJLaf;
|
||||||
|
import com.formdev.flatlaf.FlatLaf;
|
||||||
|
import com.formdev.flatlaf.extras.FlatAnimatedLafChange;
|
||||||
|
import com.formdev.flatlaf.fonts.roboto.FlatRobotoFont;
|
||||||
import com.formdev.flatlaf.FlatClientProperties;
|
import com.formdev.flatlaf.FlatClientProperties;
|
||||||
import com.formdev.flatlaf.util.SystemInfo;
|
import com.formdev.flatlaf.util.SystemInfo;
|
||||||
import dev.sillyangel.calc.themes.*;
|
import dev.sillyangel.calc.themes.*;
|
||||||
import dev.sillyangel.calc.CalculatorModes;
|
import dev.sillyangel.calc.CalculatorModes;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Calculator extends JFrame implements KeyListener {
|
public class Calculator extends JFrame implements KeyListener {
|
||||||
|
|
||||||
public static String APPILCATION_VERSION = "1.0.0pre";
|
public static String APPILCATION_VERSION = "1.0.0pre";
|
||||||
@@ -62,7 +65,7 @@ public class Calculator extends JFrame implements KeyListener {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// UIManager.setLookAndFeel("com.formdev.flatlaf.themes.FlatMacDarkLaf");
|
// UIManager.setLookAndFeel("com.formdev.flatlaf.themes.FlatMacDarkLaf");
|
||||||
|
UIManager.put("defaultFont", new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -404,30 +407,30 @@ public class Calculator extends JFrame implements KeyListener {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
btnBackspace.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnBackspace.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnClear.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnClear.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnClearEntry.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnClearEntry.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnPlusMin.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnPlusMin.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnEq.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnEq.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnDot.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnDot.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btn0.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btn0.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btn1.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btn1.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btn2.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btn2.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btn3.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btn3.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btn4.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btn4.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btn5.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btn5.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btn6.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btn6.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btn7.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btn7.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btn8.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btn8.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btn9.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btn9.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnMul.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnMul.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnMin.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnMin.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnDiv.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnDiv.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnPlus.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnPlus.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnPercent.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnPercent.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnReciprocal.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnReciprocal.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnSquare.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnSquare.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
btnSquareRoot.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
// btnSquareRoot.setFont(new Font("Segoe UI", Font.PLAIN, 29));
|
||||||
|
|
||||||
// Make all buttons non-focusable so keyboard input always goes to the frame because if we don't it breaks
|
// Make all buttons non-focusable so keyboard input always goes to the frame because if we don't it breaks
|
||||||
btnBackspace.setFocusable(false);
|
btnBackspace.setFocusable(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user