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:
Luis Uguina
2020-04-14 23:24:28 +10:00
committed by GitHub
parent 4f5fcf9d1b
commit b2227e9f4f
9 changed files with 188 additions and 14 deletions

View File

@@ -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.");