Skip to content
Snippets Groups Projects
Commit dd50a36e authored by Robert Goldmann's avatar Robert Goldmann
Browse files

added styling

parent 4128215d
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressBar;
import javafx.scene.image.Image;
......@@ -20,12 +21,14 @@ import tools.AlertGenerator;
public class Controller
{
@FXML private AnchorPane mainPane;
@FXML private Label labelDescription;
@FXML private Label labelTarget;
@FXML private Label labelUser;
@FXML private Label labelMessage;
@FXML private ProgressBar progressBar;
@FXML private ProgressBar progressBarTarget;
@FXML private StackPane stackPane;
@FXML private Button buttonStop;
private Stage stage;
private Image icon = new Image("de/deadlocker8/loadingbar/resources/icon.png");
......@@ -33,17 +36,20 @@ public class Controller
private CountdownTimer timer;
private int targetPercentage;
private boolean swapped;
private final String BACKGROUND_COLOR = "#333333";
public void init(Stage stage)
{
this.stage = stage;
mainPane.setStyle("-fx-background-color: #333333");
stackPane.setStyle("-fx-background-color: derive(#333333, -60%)");
mainPane.setStyle("-fx-background-color: " + BACKGROUND_COLOR);
stackPane.setStyle("-fx-background-color: derive(" + BACKGROUND_COLOR + ", -60%)");
progressBar.setStyle("-fx-accent: white;");
labelDescription.setStyle("-fx-text-fill: white; -fx-font-size: 20; -fx-font-weight: bold;");
labelTarget.setStyle("-fx-text-fill: white; -fx-font-size: 40; -fx-font-weight: bold;");
labelUser.setStyle("-fx-text-fill: white; -fx-font-size: 30; -fx-font-weight: bold;");
labelMessage.setStyle("-fx-text-fill: white; -fx-font-size: 30; -fx-font-weight: bold;");
buttonStop.setStyle("-fx-background-color: transparent; -fx-border-color: white; -fx-border-width: 3; -fx-border-radius: 0; -fx-text-fill: white;");
}
public void buttonStart()
......
......@@ -13,10 +13,18 @@
<children>
<VBox alignment="TOP_CENTER" layoutX="25.0" layoutY="16.0" prefHeight="363.0" prefWidth="350.0" AnchorPane.bottomAnchor="25.0" AnchorPane.leftAnchor="25.0" AnchorPane.rightAnchor="25.0" AnchorPane.topAnchor="25.0">
<children>
<Label fx:id="labelDescription" alignment="CENTER" maxWidth="1.7976931348623157E308" prefHeight="27.0" text="Stop if it hits X percent.">
<font>
<Font name="System Bold" size="18.0" />
</font>
</Label>
<Label fx:id="labelMessage" alignment="CENTER" maxWidth="1.7976931348623157E308" prefHeight="27.0">
<font>
<Font name="System Bold" size="18.0" />
</font>
<VBox.margin>
<Insets top="50.0" />
</VBox.margin>
</Label>
<Label fx:id="labelTarget" alignment="CENTER" maxWidth="1.7976931348623157E308" prefHeight="27.0">
<font>
......@@ -43,7 +51,7 @@
<Insets top="15.0" />
</VBox.margin>
</Label>
<Button mnemonicParsing="false" onAction="#buttonStop" text="STOP">
<Button fx:id="buttonStop" mnemonicParsing="false" onAction="#buttonStop" text="STOP">
<VBox.margin>
<Insets top="20.0" />
</VBox.margin>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment