From bb14f200bbd6c0722507f0a58bbd30f7aec63754 Mon Sep 17 00:00:00 2001 From: lucasstarsz Date: Mon, 1 Mar 2021 21:09:27 -0500 Subject: [PATCH 1/5] (#1) Fix misspell of Darc theme --- src/main/java/org/lucasstarsz/composeapp/user/Preferences.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/lucasstarsz/composeapp/user/Preferences.java b/src/main/java/org/lucasstarsz/composeapp/user/Preferences.java index 73debf3..5262092 100644 --- a/src/main/java/org/lucasstarsz/composeapp/user/Preferences.java +++ b/src/main/java/org/lucasstarsz/composeapp/user/Preferences.java @@ -60,7 +60,7 @@ public void save() throws IOException { public void setTheme(String newTheme) { themePath = newTheme; themeName = switch (themePath) { - case Defaults.darcStylePath -> "Dark"; + case Defaults.darcStylePath -> "Darc"; case Defaults.lightStylePath -> "Light"; case Defaults.freshStylePath -> "Fresh"; default -> "Custom Theme"; From 0b96a8952122327c0504a7e1c484da94c1657d9f Mon Sep 17 00:00:00 2001 From: lucasstarsz Date: Mon, 1 Mar 2021 21:12:21 -0500 Subject: [PATCH 2/5] (#4) Update prompt text on setting change This was fixed for all settings, not just the Font Size selector. --- .../composeapp/core/controllers/SettingsController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/lucasstarsz/composeapp/core/controllers/SettingsController.java b/src/main/java/org/lucasstarsz/composeapp/core/controllers/SettingsController.java index a2659a6..da55f22 100644 --- a/src/main/java/org/lucasstarsz/composeapp/core/controllers/SettingsController.java +++ b/src/main/java/org/lucasstarsz/composeapp/core/controllers/SettingsController.java @@ -57,12 +57,14 @@ private void initialize() { private void setTheme() { ComposeApp.getPreferences().setTheme(themes.get(themeSelector.getSelectionModel().getSelectedItem())); Preferences.reapply(); + themeSelector.setPromptText("Set Theme (Current: " + ComposeApp.getPreferences().getThemeName() + ")"); } @FXML private void setFont() { ComposeApp.getPreferences().setFontName(fontSelector.getSelectionModel().getSelectedItem()); Preferences.reapply(); + fontSelector.setPromptText("Set Font (Current: " + ComposeApp.getPreferences().getFontName() + ")"); } @FXML @@ -71,6 +73,7 @@ private void setFontSize() { int fontSize = Integer.parseInt(fontSizeField.getText()); ComposeApp.getPreferences().setFontSize(fontSize); Preferences.reapply(); + fontSizeField.setPromptText("Current Font Size: " + ComposeApp.getPreferences().getFontSize()); } catch (NumberFormatException ignored) { } } From e7178cb40b1a639064b634b872e7413293add431 Mon Sep 17 00:00:00 2001 From: lucasstarsz Date: Mon, 1 Mar 2021 21:16:10 -0500 Subject: [PATCH 3/5] (#3) Set text wrap to `on` by default Note - this only affects the default generated settings for when you first run Compose. If settings are saved, they will not be overwritten by this change. --- .../java/org/lucasstarsz/composeapp/utils/PreferencesUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/lucasstarsz/composeapp/utils/PreferencesUtil.java b/src/main/java/org/lucasstarsz/composeapp/utils/PreferencesUtil.java index 643a79a..a4d0461 100644 --- a/src/main/java/org/lucasstarsz/composeapp/utils/PreferencesUtil.java +++ b/src/main/java/org/lucasstarsz/composeapp/utils/PreferencesUtil.java @@ -31,7 +31,7 @@ private static void generateProperties(String location) throws IOException { + System.lineSeparator() + "fontsize=16" + System.lineSeparator() - + "wraptext=false" + + "wraptext=true" ); } } From 70445f6558b84764db3bf630f2e068dad9f96df5 Mon Sep 17 00:00:00 2001 From: lucasstarsz Date: Tue, 2 Mar 2021 11:12:28 -0500 Subject: [PATCH 4/5] (#6) added workflow to create jpackage artifacts --- .github/workflows/artifact-upload.yml | 73 +++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/artifact-upload.yml diff --git a/.github/workflows/artifact-upload.yml b/.github/workflows/artifact-upload.yml new file mode 100644 index 0000000..c492f30 --- /dev/null +++ b/.github/workflows/artifact-upload.yml @@ -0,0 +1,73 @@ +# This workflow uploads artifacts of Compose via jpackage using Gradle. + +name: Upload-Artifacts + +on: + pull_request: + branches: [ main ] + types: [ closed ] + +jobs: + upload-macos: + # only runs if the PR has been merged + if: github.event.pull_request.merged == true + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 14 + uses: actions/setup-java@v1 + with: + java-version: '14' + architecture: x64 + - name: Grant execute permission for gradlew + run: chmod +x ./gradlew + - name: JPackage using Gradle + run: ./gradlew jpackage + - name: Upload JPackage artifact + uses: actions/upload-artifact@v2 + with: + name: mac-os-artifact + path: build/jpackage/ + + upload-ubuntu: + # only runs if the PR has been merged + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 14 + uses: actions/setup-java@v1 + with: + java-version: '14' + architecture: x64 + - name: Grant execute permission for gradlew + run: chmod +x ./gradlew + - name: JPackage using Gradle + run: ./gradlew jpackage + - name: Upload JPackage artifact + uses: actions/upload-artifact@v2 + with: + name: ubuntu-artifact + path: build/jpackage/ + + upload-windows: + # only runs if the PR has been merged + if: github.event.pull_request.merged == true + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 14 + uses: actions/setup-java@v1 + with: + java-version: '14' + architecture: x64 + - name: JPackage using Gradle + run: ./gradlew jpackage + - name: Upload JPackage artifact + uses: actions/upload-artifact@v2 + with: + name: win-artifact + path: build/jpackage/ \ No newline at end of file From a9e0ba0403be526efb2cad4e4c28ddc7e5035705 Mon Sep 17 00:00:00 2001 From: lucasstarsz Date: Tue, 2 Mar 2021 11:29:36 -0500 Subject: [PATCH 5/5] Update build.gradle version to 0.2.1 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 990e9d6..c58a0c5 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ plugins { } group('org.lucasstarsz') -version('0.2.0') +version('0.2.1') // Build