Dark theme

This commit is contained in:
Gabriel Tofvesson 2016-10-29 23:12:48 +02:00
parent dad144eb64
commit 60dbb58e0f
4 changed files with 24 additions and 20 deletions

View File

@ -1,16 +1,16 @@
#exit{ #exit{
-fx-background-color: rgba(255, 0, 255, 0);
-fx-background-radius: 0; -fx-background-radius: 0;
} }
#exit:hover{ #exit:hover{
-fx-border-radius: 12px; -fx-border-radius: 12px;
-fx-background-color: cadetblue; -fx-background-color: cadetblue;
} }
#Pane { #pane{
-fx-border-width: 1px; -fx-border-width: 1px;
-fx-border-color: black; -fx-border-color: black;
-fx-border-style: solid; -fx-border-style: solid;
} }
#hyperlink { #hyperlink {
} }

View File

@ -32,19 +32,13 @@ public class Main extends Application {
root.lookup("#exit").setOnMouseClicked(event -> primaryStage.close()); root.lookup("#exit").setOnMouseClicked(event -> primaryStage.close());
// Drag // Drag
root.lookup("#rectangle").setOnMousePressed(new EventHandler<MouseEvent>() { root.lookup("#rectangle").setOnMousePressed(event -> {
@Override xOffset = event.getSceneX();
public void handle(MouseEvent event) { yOffset = event.getSceneY();
xOffset = event.getSceneX();
yOffset = event.getSceneY();
}
}); });
root.lookup("#rectangle").setOnMouseDragged(new EventHandler<MouseEvent>() { root.lookup("#rectangle").setOnMouseDragged(event -> {
@Override primaryStage.setX(event.getScreenX() - xOffset);
public void handle(MouseEvent event) { primaryStage.setY(event.getScreenY() - yOffset);
primaryStage.setX(event.getScreenX() - xOffset);
primaryStage.setY(event.getScreenY() - yOffset);
}
}); });
} }
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -9,6 +9,7 @@ import java.net.URLConnection;
*/ */
public class Updater { public class Updater {
private static Updater instance;
private URLConnection conn; private URLConnection conn;
private Updater(String URL) throws IOException { private Updater(String URL) throws IOException {
@ -22,4 +23,13 @@ public class Updater {
public void downloadMorePorn(){ public void downloadMorePorn(){
//TODO: Download more porn //TODO: Download more porn
} }
public void downloadEvenMorePorn(){
//TODO: Download even more porn
}
public static Updater getInstance(String url) throws IOException {
if(instance==null) instance = new Updater(url);
return instance;
}
} }

View File

@ -7,16 +7,16 @@
<?import javafx.scene.shape.Rectangle?> <?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<Pane id="Pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500" prefWidth="900" xmlns="http://javafx.com/javafx/8.0.112-ea" xmlns:fx="http://javafx.com/fxml/1"> <Pane id="pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500" prefWidth="900" style="-fx-background-color: rgba(38, 33, 33, 1);;" xmlns="http://javafx.com/javafx/8.0.102" xmlns:fx="http://javafx.com/fxml/1">
<children> <children>
<Rectangle id="rectangle" arcHeight="5.0" arcWidth="5.0" fill="white" height="50.0" strokeType="INSIDE" width="900.0" /> <Rectangle id="rectangle" arcHeight="5.0" arcWidth="5.0" fill="white" height="50.0" strokeType="INSIDE" style="-fx-fill: rgba(30, 25, 25, 1);" width="900.0" />
<Button id="exit" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="862.0" layoutY="13.0" mnemonicParsing="false" stylesheets="@../assets/style/nav.css" text="X" /> <Button id="exit" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="862.0" layoutY="13.0" mnemonicParsing="false" style="-fx-background-color: rgba(30, 25, 25, 1);" stylesheets="@../assets/style/nav.css" text="X" textFill="WHITE" />
<Label layoutX="46.0" layoutY="11.0" text="Team Avion Launcher"> <Label layoutX="46.0" layoutY="11.0" text="Team Avion Launcher" textFill="WHITE">
<font> <font>
<Font name="Centaur" size="24.0" /> <Font name="Centaur" size="24.0" />
</font> </font>
</Label> </Label>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#e4e4e4" height="450.0" layoutX="-1.0" layoutY="50.0" strokeType="INSIDE" width="145.0" /> <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#e4e4e4" height="450.0" layoutX="-1.0" layoutY="50.0" strokeType="INSIDE" style="-fx-fill: rgba(30, 25, 25, 1);" width="145.0" />
<Hyperlink id="hyperlink" layoutX="26.0" layoutY="66.0" text="Our Modpacks" /> <Hyperlink id="hyperlink" layoutX="26.0" layoutY="66.0" text="Our Modpacks" />
<Hyperlink layoutX="26.0" layoutY="102.0" text="Settings" /> <Hyperlink layoutX="26.0" layoutY="102.0" text="Settings" />
</children> </children>