Skip to content

Commit

Permalink
Merge pull request #7 from lucasstarsz/v0.2.1
Browse files Browse the repository at this point in the history
# v0.2.1
Compose Patch Fix 1

## Additions
- (Issue #3) Set text wrap to `on` as a default
- (Issue #6) Switch to Github Actions to generate jpackage artifacts

## Bug Fixes
- (Issue #1) Fix misspell of Darc theme in the Settings window
- (Issue #4) Update prompt text when values change in the Settings window
  • Loading branch information
lucasstarsz authored Mar 2, 2021
2 parents 45a24f6 + fe6ff9d commit d4d6cdc
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 8 deletions.
49 changes: 44 additions & 5 deletions .github/workflows/artifact-upload.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@

# This workflow uploads artifacts of Compose via jpackage using Gradle.

name: Upload-Artifacts

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [ closed ]

jobs:
upload-macos:
# only runs if the PR has been merged
# if: github.event.pull_request.merged == true
if: github.event.pull_request.merged == true
runs-on: macos-latest

steps:
Expand All @@ -30,5 +27,47 @@ jobs:
- name: Upload JPackage artifact
uses: actions/upload-artifact@v2
with:
name: an-artifact
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/
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group('org.lucasstarsz')
version('0.2.0')
version('0.2.1')

// Build

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private static void generateProperties(String location) throws IOException {
+ System.lineSeparator()
+ "fontsize=16"
+ System.lineSeparator()
+ "wraptext=false"
+ "wraptext=true"
);
}
}
Expand Down

0 comments on commit d4d6cdc

Please sign in to comment.