Optimize Getting Started dialog for Windows
This commit is contained in:
parent
2ded72ad68
commit
cc4f00d17c
@ -48,8 +48,12 @@ public final class ResourceManager {
|
|||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Stream<URL> getApplicationIconResources() {
|
||||||
|
return Stream.of("window.icon.large", "window.icon.medium", "window.icon.small").map(ResourceManager::getImageResource);
|
||||||
|
}
|
||||||
|
|
||||||
public static List<Image> getApplicationIcons() {
|
public static List<Image> getApplicationIcons() {
|
||||||
return Stream.of("window.icon.large", "window.icon.medium", "window.icon.small").map(ResourceManager::getImage).collect(toList());
|
return getApplicationIconResources().map(ResourceManager::getImage).collect(toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Icon getFlagIcon(String languageCode) {
|
public static Icon getFlagIcon(String languageCode) {
|
||||||
|
@ -5,6 +5,7 @@ import static net.filebot.Settings.*;
|
|||||||
import static net.filebot.util.ui.SwingUI.*;
|
import static net.filebot.util.ui.SwingUI.*;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
import java.net.URL;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
@ -18,6 +19,7 @@ import javafx.scene.Scene;
|
|||||||
import javafx.scene.control.Alert;
|
import javafx.scene.control.Alert;
|
||||||
import javafx.scene.control.Alert.AlertType;
|
import javafx.scene.control.Alert.AlertType;
|
||||||
import javafx.scene.control.ButtonType;
|
import javafx.scene.control.ButtonType;
|
||||||
|
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;
|
||||||
@ -25,6 +27,7 @@ import javafx.stage.Modality;
|
|||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import javafx.stage.StageStyle;
|
import javafx.stage.StageStyle;
|
||||||
import javafx.util.Duration;
|
import javafx.util.Duration;
|
||||||
|
import net.filebot.ResourceManager;
|
||||||
|
|
||||||
public class GettingStartedStage {
|
public class GettingStartedStage {
|
||||||
|
|
||||||
@ -56,7 +59,8 @@ public class GettingStartedStage {
|
|||||||
stage.setResizable(false);
|
stage.setResizable(false);
|
||||||
|
|
||||||
if (isWindowsApp()) {
|
if (isWindowsApp()) {
|
||||||
stage.initStyle(StageStyle.UNIFIED);
|
stage.getIcons().setAll(ResourceManager.getApplicationIconResources().map(URL::toString).map(Image::new).toArray(Image[]::new));
|
||||||
|
stage.initStyle(StageStyle.DECORATED);
|
||||||
stage.initModality(Modality.NONE);
|
stage.initModality(Modality.NONE);
|
||||||
} else {
|
} else {
|
||||||
stage.initStyle(StageStyle.UTILITY);
|
stage.initStyle(StageStyle.UTILITY);
|
||||||
|
Loading…
Reference in New Issue
Block a user