Module Manager Look and Feel#14435
Open
rlament wants to merge 4 commits into
Open
Conversation
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).
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.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Module Manager honors the look and feel as set by the user on Windows/Mac/Linux systems. Select look and feel using the
swing.defaultlafsystem property.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.defaultlafsystem property to specify the class name. Define thelook.feelproperty 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: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.
The -Dlook.feel parameter follows the classpath syntax. The separator on Windows is the semicolon and colon for all other operating systems.
Closes #12821