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());
|
frame.setIconImages(ResourceManager.getApplicationIcons());
|
||||||
} else if (isWindowsApp()) {
|
} else if (isWindowsApp()) {
|
||||||
// Windows specific configuration
|
// 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());
|
frame.setIconImages(ResourceManager.getApplicationIcons());
|
||||||
} else {
|
} else {
|
||||||
// generic Linux/FreeBSD/Solaris configuration
|
// 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());
|
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) {
|
public static Icon getFlagIcon(String languageCode) {
|
||||||
return getIcon("flags/" + languageCode);
|
return getIcon("flags/" + languageCode);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ 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,11 +55,13 @@ public class GettingStartedStage {
|
||||||
Stage stage = new Stage();
|
Stage stage = new Stage();
|
||||||
stage.setResizable(false);
|
stage.setResizable(false);
|
||||||
|
|
||||||
|
if (isMacApp()) {
|
||||||
stage.initStyle(StageStyle.DECORATED);
|
stage.initStyle(StageStyle.DECORATED);
|
||||||
stage.initModality(Modality.NONE);
|
stage.initModality(Modality.NONE);
|
||||||
|
} else {
|
||||||
if (!isMacApp()) {
|
// Windows / Linux specific configuration
|
||||||
stage.getIcons().addAll(ResourceManager.getApplicationIconsFX()); // Windows / Linux specific configuration
|
stage.initStyle(StageStyle.UTILITY);
|
||||||
|
stage.initModality(Modality.NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new GettingStartedStage(stage);
|
return new GettingStartedStage(stage);
|
||||||
|
|
Loading…
Reference in New Issue