diff --git a/src/main/java/com/github/creme332/App.java b/src/main/java/com/github/creme332/App.java index e038bfd4..c9ebf900 100644 --- a/src/main/java/com/github/creme332/App.java +++ b/src/main/java/com/github/creme332/App.java @@ -1,11 +1,11 @@ package com.github.creme332; -import com.formdev.flatlaf.themes.FlatMacLightLaf; import com.github.creme332.controller.Controller; +import com.github.creme332.view.PolydrawTheme; public class App { public static void main(String[] args) { - FlatMacLightLaf.setup(); + PolydrawTheme.setup(); new Controller(); } } diff --git a/src/main/java/com/github/creme332/view/PolydrawTheme.java b/src/main/java/com/github/creme332/view/PolydrawTheme.java new file mode 100644 index 00000000..74d7c362 --- /dev/null +++ b/src/main/java/com/github/creme332/view/PolydrawTheme.java @@ -0,0 +1,20 @@ +package com.github.creme332.view; + +import com.formdev.flatlaf.FlatLightLaf; + +public class PolydrawTheme extends FlatLightLaf { + public static boolean setup() { + // do not embed menu bar into the window title pane + System.setProperty("flatlaf.menuBarEmbedded", "false"); + + // look for properties file in theme folder (relative to resource) + registerCustomDefaultsSource("theme"); + + return setup(new PolydrawTheme()); + } + + @Override + public String getName() { + return "PolydrawTheme"; + } +} diff --git a/src/main/resources/theme/PolydrawTheme.properties b/src/main/resources/theme/PolydrawTheme.properties new file mode 100644 index 00000000..fb89491b --- /dev/null +++ b/src/main/resources/theme/PolydrawTheme.properties @@ -0,0 +1,13 @@ +defaultFont = 20 + +# https://www.formdev.com/flatlaf/components/radiobutton/ +RadioButton.background = $Button.background +RadioButton.foreground = $Button.foreground +RadioButton.margin = $Button.margin + +h00.font = +24 +h0.font = +18 +h1.font = +18 +h2.font = +6 $semibold.font +h3.font = +5 $semibold.font +h4.font = bold \ No newline at end of file