* add window icons

This commit is contained in:
Reinhard Pointner 2015-05-10 21:28:59 +00:00
parent 20de652f11
commit bc18cc6489
2 changed files with 17 additions and 1 deletions

View File

@ -34,6 +34,14 @@ public final class ResourceManager {
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) {
return getIcon(String.format("flags/%s", languageCode));
}

View File

@ -6,16 +6,20 @@ import java.awt.Desktop;
import java.net.URI;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import javafx.application.Platform;
import javafx.concurrent.Worker.State;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.paint.Color;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import net.filebot.Main;
import net.filebot.ResourceManager;
import net.filebot.Settings;
public class GettingStartedStage {
@ -27,16 +31,20 @@ public class GettingStartedStage {
Platform.runLater(() -> {
Stage stage = new Stage();
stage.setResizable(false);
if (isMacApp()) {
// Mac OS X specific configuration
stage.initStyle(StageStyle.DECORATED);
stage.initModality(Modality.NONE);
} else {
// Windows / Linux specific configuration
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);
view.show();
});