Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: maven:3-amazoncorretto-11
image: maven:3-amazoncorretto-17

stages:
- staticTest
Expand All @@ -7,11 +7,12 @@ stages:
variables:
VERSION: 0.0.${CI_PIPELINE_ID}


# Jobs
build:
stage: build
script:
- mvn clean package -Dproject.version=${VERSION}
- mvn clean package -Dproject.version=${VERSION} -Dmaven.compiler.source=17 -Dmaven.compiler.target=17
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adaption should not be needed due to adaption pom

artifacts:
name: "busylight_client.jar"
reports:
Expand Down
22 changes: 16 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<project.version>0.0.1-SNAPSHOT</project.version>
<junit.version>5.10.0</junit.version>
<mockito.version>5.4.0</mockito.version>
<java.version>17</java.version>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<javafx.version>21.0.1</javafx.version>

</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -39,25 +42,32 @@
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11.0.2</version>
<version>${javafx.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx-fxml -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11.0.2</version>
<version>${javafx.version}</version>

</dependency>
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx-graphics -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>11.0.2</version>
<version>${javafx.version}</version>
<classifier>win</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>${javafx.version}</version>
<classifier>mac-aarch64</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>11.0.2</version>
<version>${javafx.version}</version>
<classifier>linux</classifier>
</dependency>
<dependency>
Expand Down Expand Up @@ -132,8 +142,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>11</source>
<target>11</target>
<source>17</source>
<target>17</target>
</configuration>
</plugin>

Expand Down
1 change: 1 addition & 0 deletions src/main/java/de/doubleslash/usb_led_matrix/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public void start(final Stage primaryStage) throws Exception {
final UsbDeviceView usbDeviceView = new UsbDeviceView(model, usbAdapter);
usbDeviceView.initialize();
final Scene scene = new Scene(root);
scene.getStylesheets().add("/CSS/Style_Mode.css");
final ConfigurationView configurationView = fxmlLoader.getController();
configurationView.setModel(model);
configurationView.setScene(scene);
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/de/doubleslash/usb_led_matrix/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public class Settings {
private static double brightness = defaultBrightness;
private static String colorMode = defaultColorMode;
private static String cssFile = "/CSS/light_Mode.css";

private static String styleMode = "/CSS/Style_Mode.css";
private static int timeoutInMinutes = defaultTimeoutInMinutes;
private static int numberOfLeds = defaultNumberOfLeds;

Expand Down Expand Up @@ -265,11 +267,14 @@ public static void Dark(final Scene scene) {
setColorMode("dark");
if (scene.getStylesheets().contains(cssFile)) {
scene.getStylesheets().remove(cssFile);
scene.getStylesheets().add(styleMode);
}
}

public static void Light(final Scene scene) {
scene.getStylesheets().add(cssFile);
scene.getStylesheets().add(styleMode);

setColorMode("light");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ private void initialize() {
if (!model.isLoggedIntoTeams()) {
LOG.info("Start Device Code Flow.");
final Alert alert = new Alert(AlertType.CONFIRMATION);
scene.getStylesheets().add("/CSS/Style_Mode.css");

alert.setContentText("You need to log in.");
final Optional<ButtonType> optionalButtonType = alert.showAndWait();

Expand All @@ -216,6 +218,8 @@ private void initialize() {
final Parent root = fxmlLoader.load();
final AuthenticationView authFlow = fxmlLoader.getController();
final Scene scene = new Scene(root);
scene.getStylesheets().add("/CSS/Style_Mode.css");

authFlow.setScene(scene);
authFlow.customInitialize();
model.deviceCodeProperty().bind(authFlow.getDeviceCodeProperty());
Expand Down Expand Up @@ -412,6 +416,7 @@ void informationImageButton(final MouseEvent event) throws SerialPortException {
final Parent root = fxmlLoader.load();
final VersionView versionView = fxmlLoader.getController();
final Scene scene = new Scene(root);
scene.getStylesheets().add("/CSS/Style_Mode.css");
versionView.setScene(scene);
versionView.instantiate(usbAdapter.versionProperty());

Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/CSS/Style_Mode.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*{
-fx-font-family:"Arial";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated if this needed

}