diff --git a/G-Earth/src/main/java/gearth/Main.java b/G-Earth/src/main/java/gearth/Main.java index 50b7eaf..ee43c31 100644 --- a/G-Earth/src/main/java/gearth/Main.java +++ b/G-Earth/src/main/java/gearth/Main.java @@ -9,15 +9,21 @@ import javafx.application.Platform; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; +import javafx.scene.control.ToolBar; import javafx.scene.image.Image; +import javafx.scene.layout.BorderPane; +import javafx.scene.layout.Pane; +import javafx.scene.paint.Color; import javafx.stage.Stage; +import javafx.stage.StageStyle; public class Main extends Application { public static Application main; public static String version = "1.5.1"; public static String gitApi = "https://api.github.com/repos/sirjonasxx/G-Earth/releases/latest"; - public static String theme = "G-Earth"; + public static String theme = "G-Earth_Dark"; + public static String[] themes = new String[] {"G-Earth", "Tanji", "G-Earth_Dark"}; static { if (Cacher.getCacheContents().has("theme")) { @@ -33,19 +39,18 @@ public class Main extends Application { Parent root = loader.load(); GEarthController companion = loader.getController(); companion.setStage(primaryStage); + primaryStage.initStyle(StageStyle.TRANSPARENT); - primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", theme)))); - - primaryStage.setTitle(theme + " " + version); // https://stackoverflow.com/questions/20732100/javafx-why-does-stage-setresizablefalse-cause-additional-margins // primaryStage.setScene(new Scene(root, 650, 295)); primaryStage.setScene(new Scene(root)); primaryStage.setResizable(false); primaryStage.sizeToScene(); + + primaryStage.getScene().setFill(Color.TRANSPARENT); + companion.setTheme(theme); primaryStage.show(); - primaryStage.getScene().getStylesheets().add(getClass().getResource(String.format("/gearth/themes/%s/styling.css", theme)).toExternalForm()); - primaryStage.setOnCloseRequest( event -> { companion.exit(); Platform.exit(); diff --git a/G-Earth/src/main/java/gearth/misc/AdminValidator.java b/G-Earth/src/main/java/gearth/misc/AdminValidator.java index 04eac91..f722610 100644 --- a/G-Earth/src/main/java/gearth/misc/AdminValidator.java +++ b/G-Earth/src/main/java/gearth/misc/AdminValidator.java @@ -1,11 +1,16 @@ package gearth.misc; +import gearth.Main; import javafx.application.Platform; import javafx.scene.control.Alert; import javafx.scene.control.ButtonType; +import javafx.scene.image.Image; import javafx.scene.layout.Region; +import javafx.stage.Stage; +import javafx.stage.StageStyle; import java.io.PrintStream; +import java.util.Objects; import java.util.prefs.Preferences; /** @@ -44,6 +49,9 @@ public class AdminValidator { if (!AdminValidator.isAdmin()) { Platform.runLater(() -> { Alert alert = new Alert(Alert.AlertType.WARNING, "G-Earth needs admin privileges in order to work on Flash, please restart G-Earth with admin permissions unless you're using Unity", ButtonType.OK); + Stage stage = (Stage) alert.getDialogPane().getScene().getWindow(); + stage.getIcons().add(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", Main.theme)))); + stage.getScene().getStylesheets().add(Main.class.getResource(String.format("/gearth/themes/%s/styling.css", Main.theme)).toExternalForm()); alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); alert.setResizable(false); alert.show(); diff --git a/G-Earth/src/main/java/gearth/misc/ConfirmationDialog.java b/G-Earth/src/main/java/gearth/misc/ConfirmationDialog.java index 1287a4b..9eda8e3 100644 --- a/G-Earth/src/main/java/gearth/misc/ConfirmationDialog.java +++ b/G-Earth/src/main/java/gearth/misc/ConfirmationDialog.java @@ -1,11 +1,14 @@ package gearth.misc; +import gearth.Main; import javafx.scene.Group; import javafx.scene.Node; import javafx.scene.control.Alert; import javafx.scene.control.ButtonType; import javafx.scene.control.CheckBox; import javafx.scene.control.DialogPane; +import javafx.scene.image.Image; +import javafx.stage.Stage; import java.util.HashSet; import java.util.Set; @@ -23,6 +26,9 @@ public class ConfirmationDialog { Alert alert = new Alert(type); // Need to force the alert to layout in order to grab the graphic, // as we are replacing the dialog pane with a custom pane + Stage stage = (Stage) alert.getDialogPane().getScene().getWindow(); + stage.getIcons().add(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", Main.theme)))); + stage.getScene().getStylesheets().add(Main.class.getResource(String.format("/gearth/themes/%s/styling.css", Main.theme)).toExternalForm()); alert.getDialogPane().applyCss(); Node graphic = alert.getDialogPane().getGraphic(); // Create a new dialog pane that has a checkbox instead of the hide/show details button diff --git a/G-Earth/src/main/java/gearth/misc/UpdateChecker.java b/G-Earth/src/main/java/gearth/misc/UpdateChecker.java index 47db3d5..3046a58 100644 --- a/G-Earth/src/main/java/gearth/misc/UpdateChecker.java +++ b/G-Earth/src/main/java/gearth/misc/UpdateChecker.java @@ -6,9 +6,11 @@ import javafx.scene.control.Alert; import javafx.scene.control.ButtonType; import javafx.scene.control.Hyperlink; import javafx.scene.control.Label; +import javafx.scene.image.Image; import javafx.scene.layout.FlowPane; import javafx.scene.layout.Region; import javafx.scene.web.WebView; +import javafx.stage.Stage; import org.apache.commons.io.IOUtils; import org.apache.maven.artifact.versioning.ComparableVersion; import org.json.JSONObject; @@ -35,6 +37,9 @@ public class UpdateChecker { boolean isForcedUpdate = body.contains("(!)"); Alert alert = new Alert(isForcedUpdate ? Alert.AlertType.ERROR : Alert.AlertType.INFORMATION, "G-Earth is outdated!", ButtonType.OK); + Stage stage = (Stage) alert.getDialogPane().getScene().getWindow(); + stage.getIcons().add(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", Main.theme)))); + stage.getScene().getStylesheets().add(Main.class.getResource(String.format("/gearth/themes/%s/styling.css", Main.theme)).toExternalForm()); FlowPane fp = new FlowPane(); Label lbl = new Label("A new version of G-Earth has been found ("+gitv+")" + System.lineSeparator()+ System.lineSeparator() + "Update to the latest version:"); diff --git a/G-Earth/src/main/java/gearth/protocol/connection/proxy/ProxyProviderFactory.java b/G-Earth/src/main/java/gearth/protocol/connection/proxy/ProxyProviderFactory.java index 847d9e7..ca97554 100644 --- a/G-Earth/src/main/java/gearth/protocol/connection/proxy/ProxyProviderFactory.java +++ b/G-Earth/src/main/java/gearth/protocol/connection/proxy/ProxyProviderFactory.java @@ -1,5 +1,6 @@ package gearth.protocol.connection.proxy; +import gearth.Main; import gearth.misc.Cacher; import gearth.misc.OSValidator; import gearth.protocol.HConnection; @@ -12,7 +13,9 @@ import gearth.protocol.connection.proxy.flash.windows.WindowsRawIpFlashProxyProv import javafx.application.Platform; import javafx.scene.control.Alert; import javafx.scene.control.ButtonType; +import javafx.scene.image.Image; import javafx.scene.layout.Region; +import javafx.stage.Stage; import java.io.IOException; import java.util.ArrayList; @@ -106,6 +109,9 @@ public class ProxyProviderFactory { Alert alert = new Alert(Alert.AlertType.ERROR, "G-Earth is already connected to this hotel. " + "Due to current limitations you can only connect one session per hotel to G-Earth in Raw IP mode on Windows.\n\n" + "You can bypass this by using a SOCKS proxy [Extra -> Advanced -> SOCKS]", ButtonType.OK); + Stage stage = (Stage) alert.getDialogPane().getScene().getWindow(); + stage.getIcons().add(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", Main.theme)))); + stage.getScene().getStylesheets().add(Main.class.getResource(String.format("/gearth/themes/%s/styling.css", Main.theme)).toExternalForm()); alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); alert.setResizable(false); alert.show(); diff --git a/G-Earth/src/main/java/gearth/protocol/connection/proxy/flash/FlashProxyProvider.java b/G-Earth/src/main/java/gearth/protocol/connection/proxy/flash/FlashProxyProvider.java index 1a8ec33..bb1e9da 100644 --- a/G-Earth/src/main/java/gearth/protocol/connection/proxy/flash/FlashProxyProvider.java +++ b/G-Earth/src/main/java/gearth/protocol/connection/proxy/flash/FlashProxyProvider.java @@ -1,5 +1,6 @@ package gearth.protocol.connection.proxy.flash; +import gearth.Main; import gearth.protocol.HConnection; import gearth.protocol.connection.HProxy; import gearth.protocol.connection.HProxySetter; @@ -13,7 +14,9 @@ import gearth.protocol.packethandler.flash.FlashPacketHandler; import javafx.application.Platform; import javafx.scene.control.Alert; import javafx.scene.control.ButtonType; +import javafx.scene.image.Image; import javafx.scene.layout.Region; +import javafx.stage.Stage; import java.io.IOException; import java.net.Socket; @@ -121,6 +124,9 @@ public abstract class FlashProxyProvider implements ProxyProvider { protected void showInvalidConnectionError() { Platform.runLater(() -> { Alert alert = new Alert(Alert.AlertType.ERROR, "You entered invalid connection information, G-Earth could not connect", ButtonType.OK); + Stage stage = (Stage) alert.getDialogPane().getScene().getWindow(); + stage.getIcons().add(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", Main.theme)))); + stage.getScene().getStylesheets().add(Main.class.getResource(String.format("/gearth/themes/%s/styling.css", Main.theme)).toExternalForm()); alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); alert.setResizable(false); alert.show(); diff --git a/G-Earth/src/main/java/gearth/protocol/connection/proxy/flash/NormalFlashProxyProvider.java b/G-Earth/src/main/java/gearth/protocol/connection/proxy/flash/NormalFlashProxyProvider.java index 092a420..f42e56d 100644 --- a/G-Earth/src/main/java/gearth/protocol/connection/proxy/flash/NormalFlashProxyProvider.java +++ b/G-Earth/src/main/java/gearth/protocol/connection/proxy/flash/NormalFlashProxyProvider.java @@ -1,5 +1,6 @@ package gearth.protocol.connection.proxy.flash; +import gearth.Main; import gearth.misc.Cacher; import gearth.protocol.HConnection; import gearth.protocol.connection.*; @@ -12,6 +13,8 @@ import gearth.protocol.portchecker.PortCheckerFactory; import javafx.application.Platform; import javafx.scene.control.Alert; import javafx.scene.control.ButtonType; +import javafx.scene.image.Image; +import javafx.stage.Stage; import java.io.IOException; import java.net.*; @@ -106,6 +109,9 @@ public class NormalFlashProxyProvider extends FlashProxyProvider { Platform.runLater(() -> { Alert a = new Alert(Alert.AlertType.ERROR, "The port is in use by " + processName, ButtonType.OK); + Stage stage = (Stage) a.getDialogPane().getScene().getWindow(); + stage.getIcons().add(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", Main.theme)))); + stage.getScene().getStylesheets().add(Main.class.getResource(String.format("/gearth/themes/%s/styling.css", Main.theme)).toExternalForm()); a.showAndWait(); }); throw new IOException(e); diff --git a/G-Earth/src/main/java/gearth/protocol/connection/proxy/nitro/http/NitroHttpProxy.java b/G-Earth/src/main/java/gearth/protocol/connection/proxy/nitro/http/NitroHttpProxy.java index cc897a6..5ef2218 100644 --- a/G-Earth/src/main/java/gearth/protocol/connection/proxy/nitro/http/NitroHttpProxy.java +++ b/G-Earth/src/main/java/gearth/protocol/connection/proxy/nitro/http/NitroHttpProxy.java @@ -1,5 +1,6 @@ package gearth.protocol.connection.proxy.nitro.http; +import gearth.Main; import gearth.misc.ConfirmationDialog; import gearth.protocol.connection.proxy.nitro.NitroConstants; import gearth.protocol.connection.proxy.nitro.os.NitroOsFunctions; @@ -7,6 +8,8 @@ import gearth.protocol.connection.proxy.nitro.os.NitroOsFunctionsFactory; import javafx.application.Platform; import javafx.scene.control.Alert; import javafx.scene.control.ButtonType; +import javafx.scene.image.Image; +import javafx.stage.Stage; import org.littleshoot.proxy.HttpProxyServer; import org.littleshoot.proxy.impl.DefaultHttpProxyServer; import org.littleshoot.proxy.mitm.Authority; @@ -53,6 +56,9 @@ public class NitroHttpProxy { "G-Earth will ask you for Administrator permission if you do so.", "Remember my choice", ButtonType.YES, ButtonType.NO ); + Stage stage = (Stage) alert.getDialogPane().getScene().getWindow(); + stage.getIcons().add(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", Main.theme)))); + stage.getScene().getStylesheets().add(Main.class.getResource(String.format("/gearth/themes/%s/styling.css", Main.theme)).toExternalForm()); shouldInstall.set(alert.showAndWait().filter(t -> t == ButtonType.YES).isPresent()); waitForDialog.release(); diff --git a/G-Earth/src/main/java/gearth/protocol/memory/Rc4Obtainer.java b/G-Earth/src/main/java/gearth/protocol/memory/Rc4Obtainer.java index 69f8c3a..3f3a198 100644 --- a/G-Earth/src/main/java/gearth/protocol/memory/Rc4Obtainer.java +++ b/G-Earth/src/main/java/gearth/protocol/memory/Rc4Obtainer.java @@ -15,9 +15,11 @@ import javafx.scene.control.Alert; import javafx.scene.control.ButtonType; import javafx.scene.control.Hyperlink; import javafx.scene.control.Label; +import javafx.scene.image.Image; import javafx.scene.layout.FlowPane; import javafx.scene.layout.Region; import javafx.scene.web.WebView; +import javafx.stage.Stage; import java.util.Arrays; import java.util.List; @@ -80,6 +82,9 @@ public class Rc4Obtainer { Platform.runLater(() -> { Alert alert = new Alert(Alert.AlertType.WARNING, "Something went wrong!", ButtonType.OK); + Stage stage = (Stage) alert.getDialogPane().getScene().getWindow(); + stage.getIcons().add(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", Main.theme)))); + stage.getScene().getStylesheets().add(Main.class.getResource(String.format("/gearth/themes/%s/styling.css", Main.theme)).toExternalForm()); FlowPane fp = new FlowPane(); Label lbl = new Label("G-Earth has experienced an issue" + System.lineSeparator()+ System.lineSeparator() + "Head over to our Troubleshooting page to solve the problem:"); diff --git a/G-Earth/src/main/java/gearth/services/g_python/GPythonShell.java b/G-Earth/src/main/java/gearth/services/g_python/GPythonShell.java index ad9d628..97aa1ac 100644 --- a/G-Earth/src/main/java/gearth/services/g_python/GPythonShell.java +++ b/G-Earth/src/main/java/gearth/services/g_python/GPythonShell.java @@ -7,8 +7,10 @@ import javafx.scene.control.Alert; import javafx.scene.control.ButtonType; import javafx.scene.control.Hyperlink; import javafx.scene.control.Label; +import javafx.scene.image.Image; import javafx.scene.layout.FlowPane; import javafx.scene.layout.Region; +import javafx.stage.Stage; import java.io.*; import java.nio.charset.StandardCharsets; @@ -168,6 +170,9 @@ public class GPythonShell { private void showError() { Platform.runLater(() -> { Alert alert = new Alert(Alert.AlertType.ERROR, "G-Python error", ButtonType.OK); + Stage stage = (Stage) alert.getDialogPane().getScene().getWindow(); + stage.getIcons().add(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", Main.theme)))); + stage.getScene().getStylesheets().add(Main.class.getResource(String.format("/gearth/themes/%s/styling.css", Main.theme)).toExternalForm()); alert.setTitle("G-Python error"); FlowPane fp = new FlowPane(); diff --git a/G-Earth/src/main/java/gearth/ui/GEarthController.java b/G-Earth/src/main/java/gearth/ui/GEarthController.java index 6690009..4c550c3 100644 --- a/G-Earth/src/main/java/gearth/ui/GEarthController.java +++ b/G-Earth/src/main/java/gearth/ui/GEarthController.java @@ -1,13 +1,17 @@ package gearth.ui; +import gearth.Main; import gearth.protocol.connection.proxy.ProxyProviderFactory; import gearth.protocol.connection.proxy.SocksConfiguration; import gearth.ui.logger.loggerdisplays.PacketLoggerFactory; -import javafx.event.Event; -import javafx.event.EventHandler; -import javafx.scene.control.Tab; -import javafx.scene.control.TabPane; +import javafx.application.Platform; +import javafx.scene.control.*; +import javafx.scene.image.Image; +import javafx.scene.input.MouseEvent; +import javafx.scene.layout.FlowPane; import javafx.scene.layout.Pane; +import javafx.scene.layout.Region; +import javafx.scene.web.WebView; import javafx.stage.Stage; import gearth.protocol.HConnection; import gearth.ui.connection.ConnectionController; @@ -20,6 +24,7 @@ import gearth.ui.extra.ExtraController; import gearth.ui.tools.ToolsController; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; public class GEarthController { @@ -41,7 +46,9 @@ public class GEarthController { private List tabs = null; - public Pane mover; + public Pane titleBar; + public Label titleLabel; + public GEarthController() { SocksConfiguration temporary_socks = new SocksConfiguration() { public boolean useSocks() { return false; } @@ -86,6 +93,8 @@ public class GEarthController { if (PacketLoggerFactory.usesUIlogger()) { tabBar.getTabs().remove(tab_Logger); } + + } public void setStage(Stage stage) { @@ -117,9 +126,54 @@ public class GEarthController { loggerController.miniLogText(color, text); } + public void setTheme(String theme) { + Main.theme = theme; + + getStage().getScene().getStylesheets().clear(); + getStage().getScene().getStylesheets().add(Main.class.getResource(String.format("/gearth/themes/%s/styling.css", theme)).toExternalForm()); + + getStage().getIcons().clear(); + getStage().getIcons().add(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", theme)))); + + getStage().setTitle(theme.split("_")[0] + " " + Main.version); + titleLabel.setText(getStage().getTitle()); + + infoController.img_logo.setImage(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logo.png", theme)))); + infoController.version.setText(getStage().getTitle()); + } + public void exit() { tabs.forEach(SubForm::exit); hConnection.abort(); } + + public void handleCloseAction(MouseEvent event) { + this.exit(); + Platform.exit(); + + // Platform.exit doesn't seem to be enough on Windows? + System.exit(0); + } + + public void handleMinimizeAction(MouseEvent event) { + getStage().setIconified(true); + } + + private double xOffset, yOffset; + + public void handleClickAction(MouseEvent event) { + xOffset = event.getSceneX(); + yOffset = event.getSceneY(); + } + + public void handleMovementAction(MouseEvent event) { + getStage().setX(event.getScreenX() - xOffset); + getStage().setY(event.getScreenY() - yOffset); + } + + public void toggleTheme(MouseEvent event) { + int themeIndex = Arrays.asList(Main.themes).indexOf(Main.theme); + setTheme(Main.themes[(themeIndex + 1) % Main.themes.length]); + } } diff --git a/G-Earth/src/main/java/gearth/ui/extra/ExtraController.java b/G-Earth/src/main/java/gearth/ui/extra/ExtraController.java index 24373cf..359c61f 100644 --- a/G-Earth/src/main/java/gearth/ui/extra/ExtraController.java +++ b/G-Earth/src/main/java/gearth/ui/extra/ExtraController.java @@ -15,9 +15,11 @@ import gearth.ui.info.InfoController; import javafx.application.Platform; import javafx.event.ActionEvent; import javafx.scene.control.*; +import javafx.scene.image.Image; import javafx.scene.layout.FlowPane; import javafx.scene.layout.GridPane; import javafx.scene.layout.Region; +import javafx.stage.Stage; import org.json.JSONObject; /** @@ -175,6 +177,9 @@ public class ExtraController extends SubForm implements SocksConfiguration { if (!GPythonVersionUtils.validInstallation()) { Platform.runLater(() -> { Alert alert = new Alert(Alert.AlertType.ERROR, "G-Python installation", ButtonType.OK); + Stage stage = (Stage) alert.getDialogPane().getScene().getWindow(); + stage.getIcons().add(new Image(Main.class.getResourceAsStream(String.format("/gearth/themes/%s/logoSmall.png", Main.theme)))); + stage.getScene().getStylesheets().add(Main.class.getResource(String.format("/gearth/themes/%s/styling.css", Main.theme)).toExternalForm()); alert.setTitle("G-Python installation"); FlowPane fp = new FlowPane(); diff --git a/G-Earth/src/main/java/gearth/ui/info/InfoController.java b/G-Earth/src/main/java/gearth/ui/info/InfoController.java index 9cd30c4..cccd7a3 100644 --- a/G-Earth/src/main/java/gearth/ui/info/InfoController.java +++ b/G-Earth/src/main/java/gearth/ui/info/InfoController.java @@ -8,6 +8,7 @@ import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.Region; import javafx.scene.web.WebView; +import javafx.stage.Stage; /** * Created by Jonas on 06/04/18. @@ -33,11 +34,6 @@ public class InfoController extends SubForm { } public void initialize() { - version.setText(version.getText().replace("$theme", Main.theme)); - version.setText(version.getText().replace("$version", Main.version)); - - img_logo.setImage(new Image(String.format("/gearth/themes/%s/logo.png", Main.theme))); - link_ase.setTooltip(new Tooltip("https://allseeingeye.to")); link_darkbox.setTooltip(new Tooltip("https://darkbox.nl")); link_d_harble.setTooltip(new Tooltip("https://discord.gg/CzRuHvW")); diff --git a/G-Earth/src/main/java/gearth/ui/injection/InjectionController.java b/G-Earth/src/main/java/gearth/ui/injection/InjectionController.java index 7296c8c..8267791 100644 --- a/G-Earth/src/main/java/gearth/ui/injection/InjectionController.java +++ b/G-Earth/src/main/java/gearth/ui/injection/InjectionController.java @@ -107,21 +107,24 @@ public class InjectionController extends SubForm { boolean dirty = false; lbl_corrruption.setText("isCorrupted: False"); - lbl_corrruption.setFill(Paint.valueOf("Green")); + lbl_corrruption.getStyleClass().clear(); + lbl_corrruption.getStyleClass().add("not-corrupted-label"); HPacket[] packets = parsePackets(inputPacket.getText()); if (packets.length == 0) { dirty = true; lbl_corrruption.setFill(Paint.valueOf("#ee0404b2")); - lbl_corrruption.setText("isCorrupted: True"); + lbl_corrruption.getStyleClass().clear(); + lbl_corrruption.getStyleClass().add("corrupted-label"); } for (int i = 0; i < packets.length; i++) { if (packets[i].isCorrupted()) { if (!dirty) { lbl_corrruption.setText("isCorrupted: True -> " + i); - lbl_corrruption.setFill(Paint.valueOf("#ee0404b2")); + lbl_corrruption.getStyleClass().clear(); + lbl_corrruption.getStyleClass().add("corrupted-label"); dirty = true; } else lbl_corrruption.setText(lbl_corrruption.getText() + ", " + i); diff --git a/G-Earth/src/main/resources/gearth/themes/G-Earth/styling.css b/G-Earth/src/main/resources/gearth/themes/G-Earth/styling.css index 57a06a8..56493f5 100644 --- a/G-Earth/src/main/resources/gearth/themes/G-Earth/styling.css +++ b/G-Earth/src/main/resources/gearth/themes/G-Earth/styling.css @@ -1,6 +1,10 @@ -.root { - -fx-body-color : #F5F5F5; +#main-window { + -fx-body-color : transparent; + -fx-background-radius: 15; -fx-outer-border : #cecece; + -fx-border-color: #cecece; + -fx-border-radius: 11; + -fx-border-width: 0 1 1 1; } .button,.menu-button,.toggle-button,.split-menu-button { -fx-font-size: 14; @@ -909,4 +913,76 @@ VBox > .split-menu-button.last > .arrow-button { .connectedExtension { -fx-background-color: #FFFFFF; +} + +#title-bar { + -fx-background-color: #f4f4f4; + -fx-background-radius: 10 10 0 0; +} + +#close-button { + -fx-image: url("../../ui/titlebar/files/closeButton.png"); +} + +#close-button:hover { + -fx-image: url("../../ui/titlebar/files/closeButtonHover.png"); +} + +#close-button:pressed { + -fx-image: url("../../ui/titlebar/files/closeButtonPressed.png"); +} + +#minimize-button { + -fx-image: url("../../ui/titlebar/files/minimizeButton.png"); +} + +#minimize-button:hover { + -fx-image: url("../../ui/titlebar/files/minimizeButtonHover.png"); +} + +#minimize-button:pressed { + -fx-image: url("../../ui/titlebar/files/minimizeButtonPressed.png"); +} + +#main-tab-pane, #main-tab-pane > * { + -fx-background-radius: 0 0 10 10; +} + +#icon { + -fx-image: url("./logoSmall.png"); +} + +#theme-button { + -fx-image: url("./themeButton.png"); +} + +.corrupted-label { + -fx-fill: #ee0404b2; +} + +.not-corrupted-label { + -fx-fill: green; +} + +.label { + -fx-text-fill: black; +} + +.list-view { + -fx-border-color: #cccccc; + -fx-border-radius: 4; + -fx-background-color: #ffffff; + -fx-background-radius: 4; +} + +.list-cell { + -fx-background-color: transparent; +} + +.list-cell:even { + -fx-background-color: rgba(140, 140, 140, 0.1); +} + +.scroll-pane { + -fx-background-color: white; } \ No newline at end of file diff --git a/G-Earth/src/main/resources/gearth/themes/G-Earth/themeButton.png b/G-Earth/src/main/resources/gearth/themes/G-Earth/themeButton.png new file mode 100644 index 0000000..a07e78b Binary files /dev/null and b/G-Earth/src/main/resources/gearth/themes/G-Earth/themeButton.png differ diff --git a/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/logo.ico b/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/logo.ico new file mode 100644 index 0000000..61583a8 Binary files /dev/null and b/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/logo.ico differ diff --git a/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/logo.png b/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/logo.png new file mode 100644 index 0000000..93fd6bc Binary files /dev/null and b/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/logo.png differ diff --git a/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/logoSmall.png b/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/logoSmall.png new file mode 100644 index 0000000..a6a0196 Binary files /dev/null and b/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/logoSmall.png differ diff --git a/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/styling.css b/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/styling.css new file mode 100644 index 0000000..5bb9e90 --- /dev/null +++ b/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/styling.css @@ -0,0 +1,1044 @@ +#main-window { + -fx-body-color : transparent; + -fx-background-radius: 15; + -fx-outer-border: #222222; + -fx-background-color: #222222; + -fx-border-color: #222222; + -fx-border-radius: 11; + -fx-border-width: 0 1 1 1; +} + +.button,.menu-button,.toggle-button,.split-menu-button { + -fx-font-size: 14; + -fx-background-radius: 4; + -fx-border-radius: 4; + -fx-pref-height: 30; + -fx-min-width: 30; +} +.button,.menu-button,.split-menu-button,.toggle-button,.number-button { + -fx-background-insets: 0, 0, -1, 0; +} + +.label { + -fx-text-fill: #f0f0f0; +} + +.split-menu-button > .label { + -fx-border-radius: 4 0 0 4; + -fx-background-radius: 3 0 0 3; +} + +.split-menu-button > .arrow-button { + -fx-border-radius: 0 4 4 0; + -fx-background-radius: 0 3 3 0; +} + +.lg { + -fx-min-height: 46; + -fx-max-height: 46; + -fx-font-size: 18; +} + +.sm { + -fx-min-height: 30; + -fx-max-height: 30; +} + +.xs { + -fx-min-height: 22; + -fx-max-height: 22; + -fx-font-size: 10; +} + +.primary .arrow, +.success .arrow, +.info .arrow, +.warning .arrow, +.danger .arrow { + -fx-background-color: transparent, #282828; +} + +.primary > .label, +.success > .label, +.info > .label, +.warning > .label, +.danger > .label { + -fx-text-fill: white; +} + +.action-btn { + -fx-min-width: 80; +} + +/*positions*/ +/*first*/ +.button.first, .menu-button.first, .toggle-button.first, .text-field.first, .text-area.first { + -fx-border-radius: 4 0 0 4; + -fx-background-radius: 4 0 0 4; +} + +.split-menu-button.first > .arrow-button, .split-menu-button.middle > .arrow-button { + -fx-border-radius: 0; + -fx-background-radius: 0; +} + +VBox > .button.first, +VBox > .menu-button.first, +VBox > .toggle-button.first, +VBox > .split-menu-button.first, +VBox > .text-field.first, +VBox > .text-area.first { + -fx-border-radius: 4 4 0 0; + -fx-background-radius: 4 4 0 0; +} + +VBox > .split-menu-button.first > .label { + -fx-border-radius: 4 0 0 0; + -fx-background-radius: 3 0 0 0; +} +VBox > .split-menu-button.first > .arrow-button { + -fx-border-radius: 0 4 0 0; + -fx-background-radius: 0 3 0 0; +} +/*middle*/ +.middle { + -fx-border-radius: 0; + -fx-background-radius: 0; +} + +/*last*/ +.split-menu-button.middle > .label, .split-menu-button.last > .label { + -fx-border-radius: 0; + -fx-background-radius: 0; +} + +.split-menu-button.last { + -fx-border-radius: 0 4 4 0; + -fx-background-radius: 0 4 4 0; +} + +.button.middle, .text-field.middle, .text-area.middle, .split-menu-button.middle, .toggle-button.middle { + -fx-border-radius: 0; + -fx-background-radius: 0; +} + +.button.last, .text-field.last, .text-area.last, .split-menu-button.last, .toggle-button.last, .menu-button.last { + -fx-border-radius: 0 4 4 0; + -fx-background-radius: 0 4 4 0; +} +VBox > .button.last, +VBox > .menu-button.last, +VBox > .toggle-button.last, +VBox > .split-menu-button.last, +VBox > .text-field.last, +VBox > .text-area.last { + -fx-border-radius: 0 0 4 4; + -fx-background-radius: 0 0 4 4; +} + +VBox > .split-menu-button.last > .label { + -fx-border-radius: 0 0 0 4; + -fx-background-radius: 0 0 0 3; +} +VBox > .split-menu-button.last > .arrow-button { + -fx-border-radius: 0 0 4 0; + -fx-background-radius: 0 0 3 0; +} + +/*button styles*/ + +/*default button settings*/ + +/*bgcolor setting*/ +.color-picker,.date-picker > .arrow-button, +.number-button,.left-arrow-button,.right-arrow-button, +.button,.split-menu-button,.toggle-button,.menu-button, +.font-menu-button, .split-menu-button > .label, .split-menu-button > .arrow-button { + -fx-background-color: #262626; +} + +.color-picker,.date-picker > .arrow-button, +.button,.menu-button,.toggle-button,.number-button,.left-arrow-button,.right-arrow-button, +.font-menu-button, +.split-menu-button > .label,.split-menu-button > .arrow-button { + -fx-border-color: #888888; + -fx-text-fill: #f0f0f0; +} +/*just for the special split menu button*/ +.split-menu-button > .label { + -fx-border-width: 1 0 1 1; +} +/*for date picker arrow button*/ +.date-picker > .arrow-button { + -fx-border-radius: 0 4 4 0; +} +.combo-box > .arrow-button, .choice-box > .arrow-button { + -fx-border-width: 0; +} +/*hover state*/ +.color-picker:hover, +.date-picker:hover > .arrow-button, +.combo-box:hover,.choice-box:hover, +.number-button:hover,.left-arrow-button:hover,.right-arrow-button:hover, +.button:hover,.menu-button:hover,.toggle-button:hover, +.font-menu-button:hover, +.split-menu-button > .label:hover, .split-menu-button > .arrow-button:hover { + -fx-background-color: #363636; + -fx-border-color: #888888; +} +/*pressed selected*/ +.color-picker:pressed,.color-picker:selected, +.number-button:pressed,.number-button:selected, +.date-picker:pressed > .arrow-button, +.combo-box:pressed > .arrow-button,.combo-box:selected > .arrow-button, +.choice-box:pressed > .arrow-button,.choice-box:selected > .arrow-button, +.font-menu-button:pressed,.font-menu-button:selected, +.left-arrow-button:pressed,.left-arrow-button:selected, +.right-arrow-button:pressed,.right-arrow-button:selected, +.button:pressed, .button:selected,.menu-button:pressed,.menu-button:selected +,.toggle-button:pressed,.toggle-button:selected, +.split-menu-button:pressed > .label, .split-menu-button > .arrow-button:pressed { + -fx-background-color: #363636; + -fx-border-color: #999999; + -fx-effect: innershadow(gaussian, #262626, 10, 0, 0, 3); +} + +/*primary*/ + +.button.primary,.split-menu-button.primary,.toggle-button.primary,.menu-button.primary, +.split-menu-button.primary > .label, .split-menu-button.primary > .arrow-button { + -fx-background-color: #337ab7; +} + +.button.primary,.menu-button.primary,.toggle-button.primary, +.split-menu-button.primary > .label,.split-menu-button.primary > .arrow-button { + -fx-border-color: #2e6da4; + -fx-text-fill: white; +} +/*hover state*/ +.button.primary:hover,.menu-button.primary:hover,.toggle-button.primary:hover, +.split-menu-button.primary > .label:hover, .split-menu-button.primary > .arrow-button:hover { + -fx-border-color: #204d74; + -fx-background-color: #286090; +} +/*pressed selected*/ +.button.primary:pressed, .button.primary:selected, +.menu-button.primary:pressed,.menu-button.primary:selected +,.toggle-button.primary:pressed,.toggle-button.primary:selected, +.split-menu-button.primary:pressed > .label, .split-menu-button.primary > .arrow-button:pressed { + -fx-background-color: #286090; + -fx-border-color: #204d74; + -fx-effect: innershadow(gaussian, #204d74, 10, 0, 0, 3); +} + +/*success*/ + +.button.success,.split-menu-button.success,.toggle-button.success,.menu-button.success, +.split-menu-button.success > .label, .split-menu-button.success > .arrow-button { + -fx-background-color: #5cb85c; +} + +.button.success,.menu-button.success,.toggle-button.success, +.split-menu-button.success > .label,.split-menu-button.success > .arrow-button { + -fx-border-color: #4cae4c; + -fx-text-fill: white; +} +/*hover state*/ +.button.success:hover,.menu-button.success:hover,.toggle-button.success:hover, +.split-menu-button.success > .label:hover, .split-menu-button.success > .arrow-button:hover { + -fx-border-color: #398439; + -fx-background-color: #449d44; +} +/*pressed selected*/ +.button.success:pressed, .button.success:selected, +.menu-button.success:pressed,.menu-button.success:selected +,.toggle-button.success:pressed,.toggle-button.success:selected, +.split-menu-button.success:pressed > .label, .split-menu-button.success > .arrow-button:pressed { + -fx-background-color: #449d44; + -fx-border-color: #398439; + -fx-effect: innershadow(gaussian, #398439, 10, 0, 0, 3); +} + +/*info*/ + +.button.info,.split-menu-button.info,.toggle-button.info,.menu-button.info, +.split-menu-button.info > .label, .split-menu-button.info > .arrow-button { + -fx-background-color: #5bc0de; +} + +.button.info,.menu-button.info,.toggle-button.info, +.split-menu-button.info > .label,.split-menu-button.info > .arrow-button { + -fx-border-color: #46b8da; + -fx-text-fill: white; +} +/*hover state*/ +.button.info:hover,.menu-button.info:hover,.toggle-button.info:hover, +.split-menu-button.info > .label:hover, .split-menu-button.info > .arrow-button:hover { + -fx-border-color: #269abc; + -fx-background-color: #31b0d5; +} +/*pressed selected*/ +.button.info:pressed, .button.info:selected, +.menu-button.info:pressed,.menu-button.info:selected +,.toggle-button.info:pressed,.toggle-button.info:selected, +.split-menu-button.info:pressed > .label, .split-menu-button.info > .arrow-button:pressed { + -fx-background-color: #31b0d5; + -fx-border-color: #269abc; + -fx-effect: innershadow(gaussian, #269abc, 10, 0, 0, 3); +} + +/*warning*/ + +.button.warning,.split-menu-button.warning,.toggle-button.warning,.menu-button.warning, +.split-menu-button.warning > .label, .split-menu-button.warning > .arrow-button { + -fx-background-color: #f0ad4e; +} + +.button.warning,.menu-button.warning,.toggle-button.warning, +.split-menu-button.warning > .label,.split-menu-button.warning > .arrow-button { + -fx-border-color: #eea236; + -fx-text-fill: white; +} +/*hover state*/ +.button.warning:hover,.menu-button.warning:hover,.toggle-button.warning:hover, +.split-menu-button.warning > .label:hover, .split-menu-button.warning > .arrow-button:hover { + -fx-border-color: #d58512; + -fx-background-color: #ec971f; +} +/*pressed selected*/ +.button.warning:pressed, .button.warning:selected, +.menu-button.warning:pressed,.menu-button.warning:selected +,.toggle-button.warning:pressed,.toggle-button.warning:selected, +.split-menu-button.warning:pressed > .label, .split-menu-button.warning > .arrow-button:pressed { + -fx-background-color: #ec971f; + -fx-border-color: #d58512; + -fx-effect: innershadow(gaussian, #d58512, 10, 0, 0, 3); +} + +/*danger*/ + +.button.danger,.split-menu-button.danger,.toggle-button.danger,.menu-button.danger, +.split-menu-button.danger > .label, .split-menu-button.danger > .arrow-button { + -fx-background-color: #d9534f; +} + +.button.danger,.menu-button.danger,.toggle-button.danger, +.split-menu-button.danger > .label,.split-menu-button.danger > .arrow-button { + -fx-border-color: #d43f3a; + -fx-text-fill: white; +} +/*hover state*/ +.button.danger:hover,.menu-button.danger:hover,.toggle-button.danger:hover, +.split-menu-button.danger > .label:hover, .split-menu-button.danger > .arrow-button:hover { + -fx-border-color: #ac2925; + -fx-background-color: #c9302c; +} +/*pressed selected*/ +.button.danger:pressed, .button.danger:selected, +.menu-button.danger:pressed,.menu-button.danger:selected +,.toggle-button.danger:pressed,.toggle-button.danger:selected, +.split-menu-button.danger:pressed > .label, .split-menu-button.danger > .arrow-button:pressed { + -fx-border-color: #ac2925; + -fx-background-color: #c9302c; + -fx-effect: innershadow(gaussian, #ac2925, 10, 0, 0, 3); +} + +.menu-item { + -fx-min-width: 200; +} + +.menu-item:focused { + -fx-text-fill: #f0f0f0; + -fx-background-color: #2d2d2d; +} + +.menu-item:focused > * { + -fx-text-fill: #f0f0f0; +} + +.menu-item:focused .arrow { + -fx-background-color: #333333; +} + +.check-menu-item:checked:hover > .left-container > .check, +.check-menu-item:checked:focused > .left-container > .check, +.radio-menu-item:checked:hover > .left-container > .radio, +.radio-menu-item:checked:focused > .left-container > .radio { + -fx-background-color: #333333; +} + +.context-menu { + -fx-background-color: #2d2d2d; + -fx-border-radius: 4; + -fx-background-radius: 4; + -fx-border-color: #666666; +} + + +.context-menu > * { + -fx-padding: 5 0 5 0; +} + +.separator { + -fx-padding: 5 0 5 0; +} + +.text-field { + -fx-pref-height: 30; +} + +.combo-box, .choice-box { + -fx-background-insets: 0; + -fx-border-color: #888888; + -fx-background-color: #313131; + -fx-padding: -1; + -fx-border-width: 1; +} +.combo-box, .choice-box, .color-picker, .date-picker { + -fx-border-radius: 4; + -fx-background-radius: 4; + -fx-pref-height: 30; +} + +.combo-box:editable > .arrow-button { + -fx-background-color: #212121; +} + +.combo-box:editable > .arrow-button:hover { + -fx-background-color: #262626; +} + +.combo-box:editable > .arrow-button:pressed { + -fx-effect: innershadow(gaussian, #212121, 10, 0, 0, 3); +} + +.combo-box > .text-input, .date-picker > .text-input { + -fx-background-radius: 4 0 0 4; + -fx-border-width: 0; +} + +.text-field, .text-area { + -fx-text-fill: #f0f0f0; + -fx-border-color: #888888; + -fx-control-inner-background: transparent; + -fx-background-color: #363636; + -fx-border-radius: 4; + -fx-background-radius: 4; + -fx-effect: innershadow(gaussian, transparent, 0, 0, 0, 0); +} + +.text-field:focused, .text-area:focused { + -fx-border-color: #66afe9; + -fx-effect: dropshadow(gaussian, #66afe9, 10, 0, 0, 0); +} + +.text-area .scroll-pane, .text-area .scroll-pane .content { + -fx-background-color: #363636; + -fx-background-radius: 4; +} + +.text-area .scroll-pane .viewport { + -fx-background-color: transparent; +} + +.tab-pane .tab-header-background { + -fx-background-color: #222222; +} +.tab-pane.plain .tab-header-background { + -fx-background-color: transparent; +} + +.tab-pane .tab-header-area .tab { + -fx-border-radius: 4 4 0 0; + -fx-background-radius: 5 5 0 0; + -fx-background-color: transparent; + -fx-border-color: transparent; + -fx-padding: 3 10 5 10; + -fx-background-insets: 0; +} + +.tab-pane .tab-header-area .tab .tab-label { + -fx-text-fill: #5d83b4; +} + +.tab-pane .tab-header-area .tab:hover { + -fx-background-color: #444444; +} + +.tab-pane .tab-header-area .tab:selected { + -fx-focus-color: transparent; + -fx-border-color: #111111 #111111 #333333 #111111; + -fx-background-color: #333333; +} +.tab-pane .tab-header-area .tab:selected .tab-label { + -fx-text-fill: #eeeeee; +} +.tab-pane > .tab-content-area { + -fx-background-color: #333333; +} + +.tab-pane .tab-header-area .tab .tab-label { + -fx-focus-color: transparent; +} + +.tab-pane:focused > .tab-header-area > .headers-region > .tab:selected .focus-indicator { + -fx-border-color: transparent; +} + +.tab-pane > .tab-header-area > .headers-region > .tab > .tab-container > .tab-close-button { + -fx-background-color: #337ab7; +} +.tab-pane > .tab-header-area > .headers-region > .tab:selected > .tab-container > .tab-close-button { + -fx-background-color: #333333; +} +.tab-pane > .tab-header-area > .headers-region > .tab > .tab-container > .tab-close-button:hover { + -fx-background-color: #2d2d2d; + -fx-cursor: hand; +} + +.scroll-bar { + -fx-background-color: transparent; + -fx-background-radius: 0; + -fx-block-increment: 50; +} + +.corner { + -fx-background-color: transparent; +} + +.scroll-bar .decrement-button, .scroll-bar .decrement-arrow { + visibility: hidden; + -fx-pref-height: 1; + -fx-pref-width: 1; +} + +.scroll-bar .increment-button, .scroll-bar .increment-arrow { + visibility: hidden; + -fx-pref-height: 1; + -fx-pref-width: 1; +} + +.scroll-bar:vertical { + -fx-pref-width: 10; +} + +.scroll-bar:horizontal { + -fx-pref-height: 10; +} + +.scroll-bar:horizontal .track, +.scroll-bar:vertical .track { + -fx-background-color: transparent; + -fx-border-color: transparent; + -fx-background-radius: 5; +} + +.scroll-bar:vertical .track-background, +.scroll-bar:horizontal .track-background { + -fx-background-color: transparent; + -fx-background-insets: 0; + -fx-background-radius: 5; +} + +.scroll-bar:horizontal .thumb { + -fx-background-color: #777777; + -fx-background-insets: 2 0 2 0; + -fx-background-radius: 5; +} + +.scroll-bar:vertical .thumb { + -fx-background-color: #777777; + -fx-background-insets: 0 2 0 2; + -fx-background-radius: 5; +} + +.scroll-bar:horizontal .thumb:hover, +.scroll-bar:vertical .thumb:hover { + -fx-background-color: #888888; +} + +.scroll-bar:horizontal .thumb:pressed, +.scroll-bar:vertical .thumb:pressed { + -fx-background-color: #888888; +} + +.scroll-bar:vertical .increment-button, .scroll-bar:vertical .decrement-button { + -fx-background-color: transparent; + -fx-background-radius: 5; + -fx-padding: 5; +} + +.scroll-bar:horizontal .increment-button, .scroll-bar:horizontal .decrement-button { + -fx-background-color: transparent; + -fx-background-radius: 5; + -fx-padding: 5; +} + +.scroll-bar:vertical:focused, +.scroll-bar:horizontal:focused { + -fx-background-color: transparent, rgb(96, 96, 96), rgb(96, 96, 96); +} + +.menu-bar { + -fx-background-color: #2d2d2d; +} + +.menu-bar > * { + -fx-text-fill: #f0f0f0; +} + +.menu-bar > .container > .menu-button { + -fx-background-radius: 0; + -fx-background-insets: 0; + -fx-border-width: 0; + -fx-border-radius: 0; +} +.menu-bar > .container > .menu-button:hover, +.menu-bar > .container > .menu-button:showing { + -fx-background-color: #56c0e0; +} + +.color-palette { + -fx-background-color: #3d3d3d; +} + +.pagination > .pagination-control > .control-box { + -fx-spacing: -1; +} +.pagination > .pagination-control > .control-box > .left-arrow-button { + -fx-border-radius: 3 0 0 3; + -fx-border-insets: 0 0 0 7; + -fx-background-insets: 0 0 0 7, 0 0 0 5, 1 1 1 6, 2 2 2 7; +} +.pagination > .pagination-control > .control-box > .right-arrow-button { + -fx-border-radius: 0 3 3 0; + -fx-border-insets: 0 7 0 0; + -fx-background-insets: 0 7 -1 0, 0 5 0 0, 1 6 1 1, 2 7 2 2; +} +.pagination > .pagination-control > .control-box > .number-button { + -fx-background-radius: 0; + -fx-border-radius: 0; +} + +.progress-bar > .track { + -fx-pref-height: 10; + -fx-background-radius: 3; + -fx-effect: innershadow(gaussian, #e4e4e4, 4, 0, 0, 1); + -fx-background-color: #f5f5f5; +} + +.progress-bar > .bar { + -fx-background-insets: 0; + -fx-background-color: #337ab7; +} + +.progress-bar.success > .bar { + -fx-background-insets: 0; + -fx-background-color: #5cb85c; +} + +.progress-bar.info > .bar { + -fx-background-insets: 0; + -fx-background-color: #5bc0de; +} + +.progress-bar.warning > .bar { + -fx-background-insets: 0; + -fx-background-color: #f0ad4e +} + +.progress-bar.danger > .bar { + -fx-background-insets: 0; + -fx-background-color: #d9534f; +} + +.tooltip { + -fx-background: #313131; + -fx-text-fill: #f0f0f0; + -fx-background-color: #313131; + -fx-background-radius: 4px; + -fx-border-radius: 4px; + -fx-border-color: #C0C0C0; + -fx-background-insets: 0; + -fx-padding: 0.667em 0.75em 0.667em 0.75em; /* 10px */ + -fx-effect: dropshadow(three-pass-box, rgba(0, 0, 0, 0.5), 10, 0.0, 0, 3); + -fx-font-size: 0.85em; +} + +.tooltip.success { + -fx-background: #dff0d8; + -fx-background-color: #dff0d8; + -fx-text-fill: #99bb96; + -fx-border-color: #d6e9c6; +} + +.tooltip.info { + -fx-background: #d8ecf6; + -fx-background-color: #d8ecf6; + -fx-text-fill: #31708f; + -fx-border-color: #bce8f1; +} + +.tooltip.warning { + -fx-background: #fcf8e3; + -fx-background-color: #fcf8e3; + -fx-text-fill: #8a6e3c; + -fx-border-color: #faebcc; +} + +.tooltip.danger { + -fx-background: #f2dede; + -fx-background-color: #f2dede; + -fx-text-fill: #a94442; + -fx-border-color: #ebccd1; +} + +.titled-pane > .title { + -fx-background-color: #f5f5f5; + -fx-border-color: #dddddd; + /*-fx-background-insets: 5, 1, 5;*/ + -fx-background-radius: 3 3 0 0, 2 2 0 0, 1 1 0 0; + -fx-border-radius: 3 3 0 0, 2 2 0 0, 1 1 0 0; + -fx-padding: 11 +} + +.titled-pane > .content { + -fx-background-color: white; + -fx-background-radius: 0 0 4 4; + -fx-border-radius: 0 0 4 4; + -fx-border-color: #dddddd; + /*-fx-padding: -11;*/ +} + +.titled-pane.primary { + -fx-text-fill: white; +} + +.titled-pane.primary > .title { + -fx-background-color: #337ab7; + -fx-border-color: #337ab7; +} + +.titled-pane.primary > .content { + -fx-border-color: #337ab7; +} + +.titled-pane.success .arrow, +.titled-pane.info .arrow, +.titled-pane.warning .arrow, +.titled-pane.danger .arrow { + -fx-background-color: -fx-mark-highlight-color, -fx-mark-color; +} + +.titled-pane.success { + -fx-text-fill: #3c763d; +} + +.titled-pane.success > .title { + -fx-background-color: #dff0d8; + -fx-border-color: #d6e9c6; +} + +.titled-pane.success > .content { + -fx-border-color: #d6e9c6; +} + +.titled-pane.info { + -fx-text-fill: #31708f; +} + +.titled-pane.info > .title { + -fx-background-color: #d9edf7; + -fx-border-color: #bce8f1; +} + +.titled-pane.info > .content { + -fx-border-color: #bce8f1; +} + +.titled-pane.warning { + -fx-text-fill: #8a6d3b; +} + +.titled-pane.warning > .title { + -fx-background-color: #fcf8e3; + -fx-border-color: #faebcc; +} + +.titled-pane.warning > .content { + -fx-border-color: #faebcc; +} + +.titled-pane.danger { + -fx-text-fill: #a94442; +} + +.titled-pane.danger > .title { + -fx-background-color: #f2dede; + -fx-border-color: #eacbd0; +} + +.titled-pane.danger > .content { + -fx-border-color: #eacbd0; +} + +.accordion > .titled-pane > .title, +.accordion > .titled-pane > .content { + -fx-background-radius: 0; + -fx-border-radius: 0; +} + +.tool-bar:vertical { /* left */ + -fx-border-color: transparent #dddddd transparent transparent; +} + +.tool-bar { /* top */ + -fx-background-color: white; + -fx-border-color: transparent transparent #dddddd transparent; +} + +.tool-bar:vertical { + -fx-background-insets: 0, 0 1 0 0; +} + +/*table view columns*/ +.filler,.column-header,.show-hide-columns-button { + -fx-background-color: #2c2c2c, #2d2d2d, #2d2d2d; +} +.show-hide-columns-button { + -fx-border-width: 0; + -fx-background-insets: 0 0 1 1; +} +.column-header:hover,.show-hide-columns-button:hover { + -fx-background-color: #2c2c2c, #2d2d2d, #2d2d2d; +} +.column-header-background > .filler { + -fx-border-color: transparent #2d2d2d transparent transparent; + -fx-border-insets: 0 1 0 0; +} +.column-drag-header { + -fx-background-color: #2fb254; +} + +/*split pane*/ +.split-pane > .split-pane-divider { + -fx-background-color: #2d2d2d; + -fx-border-color: #888888; + -fx-pref-width: 8; +} +.split-pane:horizontal > .split-pane-divider { + -fx-background-insets: 0, 0 1 0 1; + -fx-border-width: 0 1 0 1; +} +/* vertical the two nodes are placed on top of each other. */ +.split-pane:vertical > .split-pane-divider { + -fx-background-insets: 0, 1 0 1 0; + -fx-border-width: 1 0 1 0; +} +.split-pane > .split-pane-divider:hover { + -fx-background-color: #E0E0E0; +} + +/******************************************************************************* + * * + * CheckBox * + * * + ******************************************************************************/ +.check-box > .box { + -fx-background-radius: 3; + /*-fx-padding: 0.166667em 0.166667em 0.25em 0.25em; !* 2 2 3 3 *!*/ + -fx-padding:0; + -fx-border-color: #56c0e0; + -fx-border-radius: 3; + -fx-background-color: #222222; +} +.check-box > .box > .mark { + -fx-background-color: null; + -fx-padding: 0.416667em 0.416667em 0.5em 0.5em; /* 5 5 6 6 */ + -fx-shape: "M927.936 272.992l-68.288-68.288c-12.608-12.576-32.96-12.576-45.536 0l-409.44 409.44-194.752-196.16c-12.576-12.576-32.928-12.576-45.536 0l-68.288 68.288c-12.576 12.608-12.576 32.96 0 45.536l285.568 287.488c12.576 12.576 32.96 12.576 45.536 0l500.736-500.768c12.576-12.544 12.576-32.96 0-45.536z"; + -fx-background-insets: -3 -3 1 0; +} +.check-box { + -fx-label-padding: 0.2em 0.0em 0.3em 0.416667em; /* 0 0 0 5 */ + -fx-text-fill: #f0f0f0; + -fx-padding: 0 0 2 0; +} +.check-box:indeterminate > .box { + -fx-padding: 0; +} +.check-box:selected > .box > .mark { + -fx-background-color: linear-gradient(to bottom, #56c0e0, #40b8dc); +} + +/******************************************************************************* + * * + * RadioButton * + * * + ******************************************************************************/ + +.radio-button { + -fx-label-padding: 0.0em 0.0em 0.1em 0.416667em; /* 0 0 0 5 */ + -fx-text-fill: #f0f0f0; + -fx-padding: 0 0 .5 0; +} +.radio-button > .radio, +.radio-button:focused > .radio { + -fx-border-color: #56c0e0; + -fx-border-radius: 1em; + -fx-background-radius: 1.0em; /* large value to make sure this remains circular */ + -fx-padding: 1 2 3 2; + -fx-background-color: #222222; +} +.radio-button > .radio > .dot { + -fx-background-color: transparent; + -fx-background-radius: 1.0em; /* large value to make sure this remains circular */ + -fx-padding: 0.333333em; /* 4 -- radius of the inner black dot when selected */ + -fx-background-insets: 3 2 1 2; +} +.radio-button:selected > .radio,.radio-button:hover > .radio { + -fx-fill-color: #56c0e0; +} +.radio-button:pressed > .radio { + -fx-background-color: #50c0e2; +} +.radio-button:selected > .radio > .dot { + -fx-background-color: #56c0e0; +} + +/*common things*/ +.check-box:hover > .box, +.check-box:selected > .box, +.radio-button:hover > .radio, +.radio-button:selected > .radio { + -fx-background-color: linear-gradient(to bottom, #222222, #333333); +} + +.check-box:pressed > .box, +.radio-button:pressed > .radio { + -fx-background-color: #50c0e2; +} + + +/*g-earth stuff*/ + +.hyperlink { + -fx-text-fill: #0096c8; +} + +.internalExtension { + -fx-background-color: #3d5b69; +} + +.disconnectedExtension { + -fx-background-color: #5e5e5e; +} + +.connectedExtension { + -fx-background-color: #525252; +} + +.list-view { + -fx-background-color: #2d2d2d; + -fx-border-color: #888888; + -fx-border-radius: 4; +} + +.list-cell { + -fx-text-fill: #f0f0f0; + -fx-background-color: transparent; +} + +.list-cell:even { + -fx-background-color: rgba(129, 129, 129, 0.1); +} + +/* custom titlebar */ + +#title-bar { + -fx-background-color: #222222; + -fx-background-radius: 10 10 0 0; +} + +#close-button { + -fx-image: url("../../ui/titlebar/files/closeButtonDark.png"); + -fx-padding: 10; + -fx-background-color: firebrick; +} + +#close-button:hover { + -fx-image: url("../../ui/titlebar/files/closeButtonHover.png"); + -fx-background-color: #e81123; +} + +#close-button:pressed { + -fx-image: url("../../ui/titlebar/files/closeButtonPressed.png"); + -fx-background-color: rgba(232, 17, 35, 0.8); +} + +#minimize-button { + -fx-image: url("../../ui/titlebar/files/minimizeButtonDark.png"); +} + +#minimize-button:hover { + -fx-image: url("../../ui/titlebar/files/minimizeButtonDarkHover.png"); +} + +#minimize-button:pressed { + -fx-image: url("../../ui/titlebar/files/minimizeButtonDarkPressed.png"); +} + +#main-tab-pane, #main-tab-pane > * { + -fx-background-radius: 0 0 10 10; +} + +#icon { + -fx-image: url("./logoSmall.png"); +} + +#theme-button { + -fx-image: url("./themeButton.png"); +} + +/* Error window */ +.dialog-pane { + -fx-background-color: #333333; + -fx-background-radius: 0; +} + +.dialog-pane:header .header-panel { + -fx-background-color: #222222; +} + +.grid { + -fx-background-color: #222222; +} + +/* Table view */ +.scroll-pane { + -fx-background-color: #303030; +} + +.scroll-pane > .viewport { + -fx-background-color: transparent; +} + +.scroll-pane Line { + -fx-stroke: #888888; +} + +.table-header > .label { + -fx-background-color: #222222 !important; + -fx-text-fill: #f0f0f0 !important; +} + +.pckt-info { + -fx-fill: #ffffffa0; +} + +.corrupted-label { + -fx-fill: #fc4d4d; +} + +.not-corrupted-label { + -fx-fill: #8cff8c; +} \ No newline at end of file diff --git a/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/themeButton.png b/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/themeButton.png new file mode 100644 index 0000000..04c5097 Binary files /dev/null and b/G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/themeButton.png differ diff --git a/G-Earth/src/main/resources/gearth/themes/Tanji/styling.css b/G-Earth/src/main/resources/gearth/themes/Tanji/styling.css index 18a7cc1..386f8e5 100644 --- a/G-Earth/src/main/resources/gearth/themes/Tanji/styling.css +++ b/G-Earth/src/main/resources/gearth/themes/Tanji/styling.css @@ -1,7 +1,12 @@ -.root { - -fx-body-color : #F5F5F5; +#main-window { + -fx-body-color : transparent; + -fx-background-radius: 15; -fx-outer-border : #cecece; + -fx-border-color: orange; + -fx-border-radius: 11; + -fx-border-width: 0 1 1 1; } + .button,.menu-button,.toggle-button,.split-menu-button { -fx-font-size: 14; -fx-background-radius: 4; @@ -9,6 +14,7 @@ -fx-pref-height: 30; -fx-min-width: 30; } + .button,.menu-button,.split-menu-button,.toggle-button,.number-button { -fx-background-insets: 0, 0, -1, 0; } @@ -907,4 +913,76 @@ VBox > .split-menu-button.last > .arrow-button { .connectedExtension { -fx-background-color: #FFFFFF; +} + +#title-bar { + -fx-background-color: #f4f4f4; + -fx-background-radius: 10 10 0 0; +} + +#close-button { + -fx-image: url("../../ui/titlebar/files/closeButton.png"); +} + +#close-button:hover { + -fx-image: url("../../ui/titlebar/files/closeButtonHover.png"); +} + +#close-button:pressed { + -fx-image: url("../../ui/titlebar/files/closeButtonPressed.png"); +} + +#minimize-button { + -fx-image: url("../../ui/titlebar/files/minimizeButton.png"); +} + +#minimize-button:hover { + -fx-image: url("../../ui/titlebar/files/minimizeButtonHover.png"); +} + +#minimize-button:pressed { + -fx-image: url("../../ui/titlebar/files/minimizeButtonPressed.png"); +} + +#main-tab-pane, #main-tab-pane > * { + -fx-background-radius: 0 0 10 10; +} + +#icon { + -fx-image: url("./logoSmall.png"); +} + +#theme-button { + -fx-image: url("./themeButton.png"); +} + +.corrupted-label { + -fx-fill: #ee0404b2; +} + +.not-corrupted-label { + -fx-fill: green; +} + +.label { + -fx-text-fill: black; +} + +.list-view { + -fx-border-color: #cccccc; + -fx-border-radius: 4; + -fx-background-color: #ffffff; + -fx-background-radius: 4; +} + +.list-cell { + -fx-background-color: transparent; +} + +.list-cell:even { + -fx-background-color: rgba(140, 140, 140, 0.1); +} + +.scroll-pane { + -fx-background-color: white; } \ No newline at end of file diff --git a/G-Earth/src/main/resources/gearth/themes/Tanji/themeButton.png b/G-Earth/src/main/resources/gearth/themes/Tanji/themeButton.png new file mode 100644 index 0000000..4538127 Binary files /dev/null and b/G-Earth/src/main/resources/gearth/themes/Tanji/themeButton.png differ diff --git a/G-Earth/src/main/resources/gearth/ui/G-Earth.fxml b/G-Earth/src/main/resources/gearth/ui/G-Earth.fxml index b33211f..6dc6ac7 100644 --- a/G-Earth/src/main/resources/gearth/ui/G-Earth.fxml +++ b/G-Earth/src/main/resources/gearth/ui/G-Earth.fxml @@ -1,40 +1,64 @@ - - - - + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + diff --git a/G-Earth/src/main/resources/gearth/ui/connection/Connection.fxml b/G-Earth/src/main/resources/gearth/ui/connection/Connection.fxml index 16982b0..d01b5c4 100644 --- a/G-Earth/src/main/resources/gearth/ui/connection/Connection.fxml +++ b/G-Earth/src/main/resources/gearth/ui/connection/Connection.fxml @@ -5,7 +5,7 @@ - + diff --git a/G-Earth/src/main/resources/gearth/ui/extensions/Extensions.fxml b/G-Earth/src/main/resources/gearth/ui/extensions/Extensions.fxml index 45d2864..c5539f5 100644 --- a/G-Earth/src/main/resources/gearth/ui/extensions/Extensions.fxml +++ b/G-Earth/src/main/resources/gearth/ui/extensions/Extensions.fxml @@ -12,12 +12,12 @@ - + - + diff --git a/G-Earth/src/main/resources/gearth/ui/injection/Injection.fxml b/G-Earth/src/main/resources/gearth/ui/injection/Injection.fxml index 64437ef..1f57489 100644 --- a/G-Earth/src/main/resources/gearth/ui/injection/Injection.fxml +++ b/G-Earth/src/main/resources/gearth/ui/injection/Injection.fxml @@ -37,12 +37,12 @@ - + - + diff --git a/G-Earth/src/main/resources/gearth/ui/scheduler/Scheduler.fxml b/G-Earth/src/main/resources/gearth/ui/scheduler/Scheduler.fxml index bf3f91c..bdbb415 100644 --- a/G-Earth/src/main/resources/gearth/ui/scheduler/Scheduler.fxml +++ b/G-Earth/src/main/resources/gearth/ui/scheduler/Scheduler.fxml @@ -17,7 +17,7 @@ - + diff --git a/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButton.png b/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButton.png new file mode 100644 index 0000000..292f78f Binary files /dev/null and b/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButton.png differ diff --git a/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButtonDark.png b/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButtonDark.png new file mode 100644 index 0000000..5b86539 Binary files /dev/null and b/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButtonDark.png differ diff --git a/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButtonHover.png b/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButtonHover.png new file mode 100644 index 0000000..905ebaa Binary files /dev/null and b/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButtonHover.png differ diff --git a/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButtonPressed.png b/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButtonPressed.png new file mode 100644 index 0000000..d6a1504 Binary files /dev/null and b/G-Earth/src/main/resources/gearth/ui/titlebar/files/closeButtonPressed.png differ diff --git a/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButton.png b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButton.png new file mode 100644 index 0000000..116438b Binary files /dev/null and b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButton.png differ diff --git a/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonDark.png b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonDark.png new file mode 100644 index 0000000..2eeb859 Binary files /dev/null and b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonDark.png differ diff --git a/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonDarkHover.png b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonDarkHover.png new file mode 100644 index 0000000..c5590c1 Binary files /dev/null and b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonDarkHover.png differ diff --git a/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonDarkPressed.png b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonDarkPressed.png new file mode 100644 index 0000000..605253b Binary files /dev/null and b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonDarkPressed.png differ diff --git a/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonHover.png b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonHover.png new file mode 100644 index 0000000..4ce93b1 Binary files /dev/null and b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonHover.png differ diff --git a/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonPressed.png b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonPressed.png new file mode 100644 index 0000000..a6bcba3 Binary files /dev/null and b/G-Earth/src/main/resources/gearth/ui/titlebar/files/minimizeButtonPressed.png differ