Added darktheme + Theme switch + Build in Titlebar + Fix of some lighttheme elements
@ -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.show();
|
||||
primaryStage.getScene().getStylesheets().add(getClass().getResource(String.format("/gearth/themes/%s/styling.css", theme)).toExternalForm());
|
||||
primaryStage.getScene().setFill(Color.TRANSPARENT);
|
||||
companion.setTheme(theme);
|
||||
|
||||
primaryStage.show();
|
||||
primaryStage.setOnCloseRequest( event -> {
|
||||
companion.exit();
|
||||
Platform.exit();
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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:");
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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:");
|
||||
|
@ -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();
|
||||
|
@ -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<SubForm> 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]);
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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"));
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
@ -910,3 +914,75 @@ 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;
|
||||
}
|
BIN
G-Earth/src/main/resources/gearth/themes/G-Earth/themeButton.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/logo.ico
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/logo.png
Normal file
After Width: | Height: | Size: 569 KiB |
After Width: | Height: | Size: 8.8 KiB |
1044
G-Earth/src/main/resources/gearth/themes/G-Earth_Dark/styling.css
Normal file
After Width: | Height: | Size: 8.0 KiB |
@ -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;
|
||||
}
|
||||
@ -908,3 +914,75 @@ 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;
|
||||
}
|
BIN
G-Earth/src/main/resources/gearth/themes/Tanji/themeButton.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
@ -1,17 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.Tab?>
|
||||
<?import javafx.scene.control.TabPane?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<!--maxHeight="19.0" minHeight="19.0"-->
|
||||
|
||||
<VBox xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="gearth.ui.GEarthController">
|
||||
<Pane fx:id="mover" maxHeight="0.0" minHeight="0.0" prefWidth="200.0"/>
|
||||
<TabPane fx:id="tabBar" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity"
|
||||
minWidth="-Infinity" prefHeight="295.0" prefWidth="650.0" tabClosingPolicy="UNAVAILABLE">
|
||||
<VBox id="main-window" prefWidth="650.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.GEarthController">
|
||||
<Pane id="title-bar" fx:id="titleBar" maxHeight="25.0" onMouseDragged="#handleMovementAction" onMousePressed="#handleClickAction" prefHeight="25.0" prefWidth="200.0">
|
||||
<children>
|
||||
<ImageView id="close-button" fitHeight="25.0" fitWidth="50.0" layoutX="601.0" onMouseClicked="#handleCloseAction" onTouchPressed="#handleCloseAction" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@titlebar/files/closeButton.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView id="minimize-button" fitHeight="25.0" fitWidth="50.0" layoutX="551.0" onMouseClicked="#handleMinimizeAction" onTouchPressed="#handleMinimizeAction" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@titlebar/files/minimizeButton.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<ImageView id="icon" fitHeight="16.0" fitWidth="16.0" layoutX="7.0" layoutY="5.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../themes/G-Earth/logoSmall.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<Label fx:id="titleLabel" layoutX="23.0" layoutY="5.0" text="G-Earth 1.5.1">
|
||||
<padding>
|
||||
<Insets left="2.0" />
|
||||
</padding>
|
||||
</Label>
|
||||
<ImageView id="theme-button" fitHeight="20.0" fitWidth="38.0" layoutX="505.0" layoutY="3.0" onMouseClicked="#toggleTheme" onTouchPressed="#toggleTheme" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../themes/G-Earth/themeButton.png" />
|
||||
</image></ImageView>
|
||||
</children></Pane>
|
||||
<TabPane id="main-tab-pane" fx:id="tabBar" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="295.0" prefWidth="650.0" tabClosingPolicy="UNAVAILABLE">
|
||||
<Tab text="Connection">
|
||||
<fx:include fx:id="connection" source="connection/Connection.fxml" />
|
||||
</Tab>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
|
||||
<GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="258.0" prefWidth="650.0" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.connection.ConnectionController">
|
||||
<GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="258.0" prefWidth="650.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.connection.ConnectionController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
|
@ -12,12 +12,12 @@
|
||||
<RowConstraints maxHeight="227.0" minHeight="10.0" prefHeight="222.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="185.0" minHeight="10.0" prefHeight="40.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<ScrollPane fx:id="scroller" hbarPolicy="NEVER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" style="-fx-border-color: #888888; -fx-background: #FFFFFF; -fx-border-radius: 4px;" vbarPolicy="ALWAYS">
|
||||
<ScrollPane fx:id="scroller" hbarPolicy="NEVER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" style="-fx-border-color: #888888; -fx-background: transparent; -fx-border-radius: 4px;" styleClass="table-header" vbarPolicy="ALWAYS">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="8.0" left="17.0" right="17.0" top="17.0" />
|
||||
</GridPane.margin>
|
||||
<VBox fx:id="extensioncontainer" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
|
||||
<GridPane fx:id="header_ext" gridLinesVisible="true">
|
||||
<GridPane fx:id="header_ext" gridLinesVisible="true" styleClass="table-header">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="22.0" prefWidth="132.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="34.0" prefWidth="204.0" />
|
||||
|
@ -37,12 +37,12 @@
|
||||
<GridPane.margin>
|
||||
<Insets left="13.0" right="13.0" top="4.0" />
|
||||
</GridPane.margin>
|
||||
<Text fx:id="lbl_corrruption" fill="#ee0404b2" strokeType="OUTSIDE" strokeWidth="0.0" text="isCorrupted: True">
|
||||
<Text fx:id="lbl_corrruption" styleClass="corrupted-label" strokeType="OUTSIDE" strokeWidth="0.0" text="isCorrupted: True">
|
||||
<font>
|
||||
<Font name="System Italic" size="11.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Text fx:id="lbl_pcktInfo" fill="#000000b2" nodeOrientation="LEFT_TO_RIGHT" strokeType="OUTSIDE" strokeWidth="0.0" text="header (id:NULL, length:0)" GridPane.columnIndex="1" GridPane.halignment="RIGHT">
|
||||
<Text fx:id="lbl_pcktInfo" fill="#000000b2" styleClass="pckt-info" nodeOrientation="LEFT_TO_RIGHT" strokeType="OUTSIDE" strokeWidth="0.0" text="header (id:NULL, length:0)" GridPane.columnIndex="1" GridPane.halignment="RIGHT">
|
||||
<font>
|
||||
<Font name="System Italic" size="11.0" />
|
||||
</font>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<Insets bottom="8.0" left="17.0" right="17.0" top="17.0" />
|
||||
</GridPane.margin>
|
||||
<VBox fx:id="schedulecontainer" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
|
||||
<GridPane fx:id="header" gridLinesVisible="true">
|
||||
<GridPane fx:id="header" gridLinesVisible="true" styleClass="table-header">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="163.0" minWidth="10.0" percentWidth="10.0" prefWidth="57.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="190.0" minWidth="10.0" percentWidth="39.0" prefWidth="189.0" />
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 662 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |