* add window icons
This commit is contained in:
parent
20de652f11
commit
bc18cc6489
|
@ -34,6 +34,14 @@ public final class ResourceManager {
|
||||||
return asList(images);
|
return asList(images);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<URL> getApplicationIconURLs() {
|
||||||
|
URL[] images = new URL[3];
|
||||||
|
images[0] = ResourceManager.getImageResource("window.icon.small");
|
||||||
|
images[1] = ResourceManager.getImageResource("window.icon.medium");
|
||||||
|
images[2] = ResourceManager.getImageResource("window.icon.large");
|
||||||
|
return asList(images);
|
||||||
|
}
|
||||||
|
|
||||||
public static Icon getFlagIcon(String languageCode) {
|
public static Icon getFlagIcon(String languageCode) {
|
||||||
return getIcon(String.format("flags/%s", languageCode));
|
return getIcon(String.format("flags/%s", languageCode));
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,16 +6,20 @@ import java.awt.Desktop;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.concurrent.Worker.State;
|
import javafx.concurrent.Worker.State;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.scene.web.WebEngine;
|
import javafx.scene.web.WebEngine;
|
||||||
import javafx.scene.web.WebView;
|
import javafx.scene.web.WebView;
|
||||||
|
import javafx.stage.Modality;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import javafx.stage.StageStyle;
|
import javafx.stage.StageStyle;
|
||||||
import net.filebot.Main;
|
import net.filebot.Main;
|
||||||
|
import net.filebot.ResourceManager;
|
||||||
import net.filebot.Settings;
|
import net.filebot.Settings;
|
||||||
|
|
||||||
public class GettingStartedStage {
|
public class GettingStartedStage {
|
||||||
|
@ -27,16 +31,20 @@ public class GettingStartedStage {
|
||||||
|
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
Stage stage = new Stage();
|
Stage stage = new Stage();
|
||||||
stage.setResizable(false);
|
|
||||||
|
|
||||||
if (isMacApp()) {
|
if (isMacApp()) {
|
||||||
// Mac OS X specific configuration
|
// Mac OS X specific configuration
|
||||||
stage.initStyle(StageStyle.DECORATED);
|
stage.initStyle(StageStyle.DECORATED);
|
||||||
|
stage.initModality(Modality.NONE);
|
||||||
} else {
|
} else {
|
||||||
// Windows / Linux specific configuration
|
// Windows / Linux specific configuration
|
||||||
stage.initStyle(StageStyle.UTILITY);
|
stage.initStyle(StageStyle.UTILITY);
|
||||||
|
stage.initModality(Modality.NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage.getIcons().addAll(ResourceManager.getApplicationIconURLs().stream().map((url) -> new Image(url.toString())).collect(Collectors.toList()));
|
||||||
|
stage.setResizable(false);
|
||||||
|
|
||||||
GettingStartedStage view = new GettingStartedStage(stage);
|
GettingStartedStage view = new GettingStartedStage(stage);
|
||||||
view.show();
|
view.show();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue