-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from creme332/laf
update laf settings
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |