Skip to content

Commit

Permalink
This is related to PR #158 in edvin/fxlauncher (edvin/fxlauncher#158).
Browse files Browse the repository at this point in the history
It allows you to customize the UI. The fields to customize the UI were
already apart of FXLauncher, there was just no easy way to change them.

The fields are
 * updateText (--update-text)
 * updateLabelStyle (--update-label-style)
 * progressBarStyle (--progress-bar-style)
 * wrapperStyle (--wrapper-style)
  • Loading branch information
TurekBot committed Apr 14, 2019
1 parent b51bf4b commit c28c413
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,34 @@ class FXLauncherExtension {
List<String> javapackagerOptions
String javapackerNativeParam = ""

/**
* The text that the launcher will show when showing the FXLauncher updating user interface.
* <p>
* The default is <code>Updating...</code>.
*/
String updateText

/**
* The CSS styling to apply to the {@link #updateText} Label.
* <p>
* The default is <code>-fx-font-weight: bold;</code>.
*/
String updateLabelStyle

/**
* The CSS styling to apply to the progress bar.
* <p>
* The default is <code>-fx-pref-width: 200;</code>.
*/
String progressBarStyle

/**
* The CSS styling to apply to the VBox that contains the update text and the progress bar.
* <p>
* The default is <code>-fx-spacing: 10; -fx-padding: 25;</code>.
*/
String wrapperStyle

String cacheDir

Boolean acceptDowngrade
Expand All @@ -70,7 +98,6 @@ class FXLauncherExtension {
final Project project



FXLauncherExtension(Project project) {
this.project = project
applicationVersion = project.version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,25 @@ class GenerateApplicationManifestTask extends DefaultTask {

FXLauncherExtension fxlauncher = project.extensions.fxlauncher

// These first three arguments are required by the CreateManifest class.
def args = [
fxlauncher.resolveApplicationUrl(),
fxlauncher.resolveApplicationMainClass(),
fxlauncher.resolveWorkingDirectory().absolutePath
]

if (fxlauncher.updateText)
args += '--update-text=' + fxlauncher.updateText

if (fxlauncher.updateLabelStyle)
args += '--update-label-style=' + fxlauncher.updateLabelStyle

if (fxlauncher.progressBarStyle)
args += '--progress-bar-style=' + fxlauncher.progressBarStyle

if (fxlauncher.wrapperStyle)
args += '--wrapper-style=' + fxlauncher.wrapperStyle

if (fxlauncher.cacheDir)
args += '--cache-dir=' + fxlauncher.cacheDir

Expand Down

0 comments on commit c28c413

Please sign in to comment.