Avoid rendering issues on Windows 10
This commit is contained in:
parent
44fe370ed2
commit
cb7297a95e
|
@ -246,7 +246,9 @@ public class Main {
|
|||
frame.setIconImages(ResourceManager.getApplicationIcons());
|
||||
} else if (isWindowsApp()) {
|
||||
// Windows specific configuration
|
||||
WinAppUtilities.setAppUserModelID(Settings.getApplicationUserModelID()); // support Windows 7 taskbar behaviours
|
||||
if (!isAppStore()) {
|
||||
WinAppUtilities.setAppUserModelID(Settings.getApplicationUserModelID()); // support Windows 7 taskbar behaviours (not necessary for Windows 10 apps)
|
||||
}
|
||||
frame.setIconImages(ResourceManager.getApplicationIcons());
|
||||
} else {
|
||||
// generic Linux/FreeBSD/Solaris configuration
|
||||
|
|
|
@ -52,10 +52,6 @@ public final class ResourceManager {
|
|||
return Stream.of("window.icon.large", "window.icon.medium", "window.icon.small").map(ResourceManager::getImage).collect(toList());
|
||||
}
|
||||
|
||||
public static List<javafx.scene.image.Image> getApplicationIconsFX() {
|
||||
return Stream.of("window.icon.large", "window.icon.medium", "window.icon.small").map(ResourceManager::getImageResource).map(URL::toString).map(r -> new javafx.scene.image.Image(r)).collect(toList());
|
||||
}
|
||||
|
||||
public static Icon getFlagIcon(String languageCode) {
|
||||
return getIcon("flags/" + languageCode);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import javafx.stage.Modality;
|
|||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
import javafx.util.Duration;
|
||||
import net.filebot.ResourceManager;
|
||||
|
||||
public class GettingStartedStage {
|
||||
|
||||
|
@ -56,11 +55,13 @@ public class GettingStartedStage {
|
|||
Stage stage = new Stage();
|
||||
stage.setResizable(false);
|
||||
|
||||
if (isMacApp()) {
|
||||
stage.initStyle(StageStyle.DECORATED);
|
||||
stage.initModality(Modality.NONE);
|
||||
|
||||
if (!isMacApp()) {
|
||||
stage.getIcons().addAll(ResourceManager.getApplicationIconsFX()); // Windows / Linux specific configuration
|
||||
} else {
|
||||
// Windows / Linux specific configuration
|
||||
stage.initStyle(StageStyle.UTILITY);
|
||||
stage.initModality(Modality.NONE);
|
||||
}
|
||||
|
||||
return new GettingStartedStage(stage);
|
||||
|
|
Loading…
Reference in New Issue