mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-18 10:41:26 +00:00
try to set icon and window title on Linux. Might still be buggy, see https://bugs.openjdk.java.net/browse/JDK-8092837
This commit is contained in:
@@ -194,6 +194,7 @@ public class MainController implements ViewController {
|
||||
public void initStage(Stage stage) {
|
||||
stage.setScene(new Scene(getRoot()));
|
||||
stage.sizeToScene();
|
||||
stage.setTitle(localization.getString("app.name")); // set once before bind to avoid display bugs with Linux window managers
|
||||
stage.titleProperty().bind(windowTitle());
|
||||
stage.setResizable(false);
|
||||
loadFont("/css/ionicons.ttf");
|
||||
@@ -203,9 +204,10 @@ public class MainController implements ViewController {
|
||||
subs = subs.and(EasyBind.includeWhen(mainWindow.getScene().getRoot().getStyleClass(), INACTIVE_WINDOW_STYLE_CLASS, mainWindow.focusedProperty().not()));
|
||||
Application.setUserAgentStylesheet(getClass().getResource("/css/mac_theme.css").toString());
|
||||
} else if (SystemUtils.IS_OS_LINUX) {
|
||||
stage.getIcons().add(new Image(getClass().getResourceAsStream("/window_icon_512.png")));
|
||||
Application.setUserAgentStylesheet(getClass().getResource("/css/linux_theme.css").toString());
|
||||
} else if (SystemUtils.IS_OS_WINDOWS) {
|
||||
stage.getIcons().add(new Image(getClass().getResourceAsStream("/window_icon.png")));
|
||||
stage.getIcons().add(new Image(getClass().getResourceAsStream("/window_icon_32.png")));
|
||||
Application.setUserAgentStylesheet(getClass().getResource("/css/win_theme.css").toString());
|
||||
}
|
||||
exitUtil.initExitHandler(this::gracefulShutdown);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 588 B |
BIN
main/ui/src/main/resources/window_icon_32.png
Normal file
BIN
main/ui/src/main/resources/window_icon_32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
main/ui/src/main/resources/window_icon_512.png
Normal file
BIN
main/ui/src/main/resources/window_icon_512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
Reference in New Issue
Block a user