feature: light/dark mode theme support (#208)
* feature: light/dark mode theme support New feature providing a more modern flat design with support for light and dark modes, including: - New SheepIt logo (old one removed) - New configuration option (-theme) that changes the existing client theme. - Minimal UI cosmetic changes (some separation lines under the logo and above the buttons)
This commit is contained in:
@@ -112,6 +112,9 @@ public class Worker {
|
||||
@Option(name = "-title", usage = "Custom title for the GUI Client", required = false)
|
||||
private String title = "SheepIt Render Farm";
|
||||
|
||||
@Option(name = "-theme", usage = "Specify the theme to use for the graphical client, default 'light', available 'light', 'dark'", required = false)
|
||||
private String theme = null;
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Worker().doMain(args);
|
||||
}
|
||||
@@ -283,6 +286,16 @@ public class Worker {
|
||||
config.setUIType(ui_type);
|
||||
}
|
||||
|
||||
if (theme != null) {
|
||||
if (!theme.equals("light") && !theme.equals("dark")) {
|
||||
System.err.println(String.format("The theme specified (%s) doesn't exist. Please choose 'light' or 'dark'.", theme));
|
||||
System.err.println("Aborting");
|
||||
System.exit(2);
|
||||
}
|
||||
|
||||
config.setTheme(this.theme);
|
||||
}
|
||||
|
||||
if (config_file != null) {
|
||||
if (new File(config_file).exists() == false) {
|
||||
System.err.println("Configuration file not found.");
|
||||
|
||||
Reference in New Issue
Block a user