Skip to content

Module Manager Look and Feel#14435

Open
rlament wants to merge 4 commits into
vassalengine:release-3.7from
rlament:12821-defaultlaf
Open

Module Manager Look and Feel#14435
rlament wants to merge 4 commits into
vassalengine:release-3.7from
rlament:12821-defaultlaf

Conversation

@rlament

@rlament rlament commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

Module Manager honors the look and feel as set by the user on Windows/Mac/Linux systems. Select look and feel using the swing.defaultlaf system property.

  • Module Manager gets the color from look and feel.
  • Maintains the same look and feel for child processes (player and editor).
  • Dynamically loads a custom Look and Feel.
  • Supports loading of Intellij theme.json files using the FlatLaf extension.

For dark modes there are some downstream visibility issues. Some of the default buttons (server, camera, zoom) are hard to see in dark mode. Messages in the chat log are hard to read.

Custom Look and Feel can be set from the command line. Use the swing.defaultlaf system property to specify the class name. Define the look.feel property to specify a jar or json file. It can be a relative or absolute path. As a quick example of using Flatlaf on Windows, download and copy the jar to the Vassal.exe folder. Create or edit the vassal.l4j.ini file in the same folder, adding:

-Dswing.defaultlaf=com.formdev.flatlaf.FlatDarkLaf
-Dlook.feel=flatlaf-3.7.jar

Vassal should now start in dark mode. Other operating system have slightly different mechanisms for injecting command line parameters.

To load a json Look and Feel file, place the theme.json file and the FlatLaf jar files in the Vassal installation folder. For example using the Salmon theme on Windows, add the following lines to the vassal.l4j.ini file. Loading a json file requires both FlatLaf jars.

-Dlook.feel=flatlaf-3.7.jar;flatlaf-intellij-themes-3.7.jar
-Dswing.defaultlaf=Salmon.theme.json

The -Dlook.feel parameter follows the classpath syntax. The separator on Windows is the semicolon and colon for all other operating systems.

Closes #12821

Get the Module Manager text color from look and feel.
For non-Windows systems set the look and feel to the
swing.defaultlaf setting if the system property exists.
Maintain same look and feel for child processes (player and editor).
@rlament rlament changed the base branch from master to release-3.7 January 10, 2026 04:13
@riverwanderer

riverwanderer commented Jan 10, 2026

Copy link
Copy Markdown
Collaborator

Fix to #12821 confirmed on MacOS (Monterey) with default configuration i.e. no attempt to define swing.defaultlaf.

Default to system look and feel on failure to load.
Look and Feel is set from the command line
Use -Dswing.defaultlaf to specify the class name
Use -Dlook.feel to specify the jar file
When the default LaF ends with the extension theme.json
load the look and feel as an Intellij theme file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix text colour in Module column of Module Manager

2 participants