diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 918d1db8e2..acd531563f 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -221,6 +221,13 @@ static private void createAndShowGUI(String[] args) { // theme.txt file in the user's sketchbook folder is picked up. Theme.init(); + // Set the look and feel before any window is constructed, so that the + // correct theme look and feel preferences are applied to the UI + FlatLaf laf = "dark".equals(Theme.get("laf.mode")) ? + new FlatDarkLaf() : new FlatLightLaf(); + laf.setExtraDefaults(Collections.singletonMap("@accentColor", Theme.get("laf.accent.color"))); + FlatLaf.setup(laf); + // Create a location for untitled sketches setupUntitleSketches(); diff --git a/build/shared/lib/theme/Alloys/agpalilik.txt b/build/shared/lib/theme/Alloys/agpalilik.txt index bdbb112977..e268ffa551 100644 --- a/build/shared/lib/theme/Alloys/agpalilik.txt +++ b/build/shared/lib/theme/Alloys/agpalilik.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #8AB2FF # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Alloys/bondoc.txt b/build/shared/lib/theme/Alloys/bondoc.txt index c351bbc947..62d0505015 100644 --- a/build/shared/lib/theme/Alloys/bondoc.txt +++ b/build/shared/lib/theme/Alloys/bondoc.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #BFA2FF # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Alloys/brahin.txt b/build/shared/lib/theme/Alloys/brahin.txt index e95468b4e4..dc8caa42a0 100644 --- a/build/shared/lib/theme/Alloys/brahin.txt +++ b/build/shared/lib/theme/Alloys/brahin.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #86A100 # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Alloys/gancedo.txt b/build/shared/lib/theme/Alloys/gancedo.txt index 5ca9496baa..1ccc3d011d 100644 --- a/build/shared/lib/theme/Alloys/gancedo.txt +++ b/build/shared/lib/theme/Alloys/gancedo.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #E46000 # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Alloys/morito.txt b/build/shared/lib/theme/Alloys/morito.txt index 3143971e79..a1b4fc100a 100644 --- a/build/shared/lib/theme/Alloys/morito.txt +++ b/build/shared/lib/theme/Alloys/morito.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #EA9EFF # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Alloys/omolon.txt b/build/shared/lib/theme/Alloys/omolon.txt index 3780594ca3..9a4344ec31 100644 --- a/build/shared/lib/theme/Alloys/omolon.txt +++ b/build/shared/lib/theme/Alloys/omolon.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #999EA6 # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Alloys/tagish.txt b/build/shared/lib/theme/Alloys/tagish.txt index c85b4f5027..43b4256479 100644 --- a/build/shared/lib/theme/Alloys/tagish.txt +++ b/build/shared/lib/theme/Alloys/tagish.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #ABABAB # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Minerals/antimony.txt b/build/shared/lib/theme/Minerals/antimony.txt index 64910d7aca..f35139326e 100644 --- a/build/shared/lib/theme/Minerals/antimony.txt +++ b/build/shared/lib/theme/Minerals/antimony.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #72777A # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Minerals/bauxite.txt b/build/shared/lib/theme/Minerals/bauxite.txt index cb80fb78a4..ec4bec75b9 100644 --- a/build/shared/lib/theme/Minerals/bauxite.txt +++ b/build/shared/lib/theme/Minerals/bauxite.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #F8954A # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Minerals/fluorite.txt b/build/shared/lib/theme/Minerals/fluorite.txt index 4912d0dc24..fd885ebd14 100644 --- a/build/shared/lib/theme/Minerals/fluorite.txt +++ b/build/shared/lib/theme/Minerals/fluorite.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #A49EA9 # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Minerals/garnet.txt b/build/shared/lib/theme/Minerals/garnet.txt index 415e9850a4..fd3a1b647e 100644 --- a/build/shared/lib/theme/Minerals/garnet.txt +++ b/build/shared/lib/theme/Minerals/garnet.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #FF94A3 # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Minerals/malachite.txt b/build/shared/lib/theme/Minerals/malachite.txt index 194b867543..a6a870bfc3 100644 --- a/build/shared/lib/theme/Minerals/malachite.txt +++ b/build/shared/lib/theme/Minerals/malachite.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #17AD71 # global color used in dialog boxes that have text links diff --git a/build/shared/lib/theme/Minerals/pyrite.txt b/build/shared/lib/theme/Minerals/pyrite.txt index 1f00c8e0bb..0c982f54ed 100644 --- a/build/shared/lib/theme/Minerals/pyrite.txt +++ b/build/shared/lib/theme/Minerals/pyrite.txt @@ -1,6 +1,6 @@ ## Look-and-Feel Entries ## -laf.mode = light +laf.mode = dark laf.accent.color = #999166 # global color used in dialog boxes that have text links