mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-03-14 18:06:34 -04:00
Moved window icon code to main class
This commit is contained in:
parent
864c7a15db
commit
89b7dac5b8
@ -22,6 +22,7 @@ import io.bitsquare.di.BitSquareModule;
|
||||
import io.bitsquare.gui.AWTSystemTray;
|
||||
import io.bitsquare.gui.Navigation;
|
||||
import io.bitsquare.gui.components.Popups;
|
||||
import io.bitsquare.gui.util.ImageUtil;
|
||||
import io.bitsquare.gui.util.Profiler;
|
||||
import io.bitsquare.msg.MessageFacade;
|
||||
import io.bitsquare.msg.SeedNodeAddress;
|
||||
@ -42,6 +43,7 @@ import java.util.List;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.scene.*;
|
||||
import javafx.scene.image.*;
|
||||
import javafx.scene.input.*;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
@ -140,6 +142,12 @@ public class BitSquare extends Application {
|
||||
|
||||
primaryStage.setTitle("BitSquare (" + APP_NAME + ")");
|
||||
|
||||
// sometimes there is a rendering bug, see https://github.com/bitsquare/bitsquare/issues/160
|
||||
if (ImageUtil.isRetina())
|
||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/images/window_icon@2x.png")));
|
||||
else
|
||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/images/window_icon.png")));
|
||||
|
||||
ViewLoader.setInjector(injector);
|
||||
|
||||
final ViewLoader loader =
|
||||
|
@ -25,7 +25,6 @@ import io.bitsquare.gui.ViewCB;
|
||||
import io.bitsquare.gui.components.NetworkSyncPane;
|
||||
import io.bitsquare.gui.components.Popups;
|
||||
import io.bitsquare.gui.components.SystemNotification;
|
||||
import io.bitsquare.gui.util.ImageUtil;
|
||||
import io.bitsquare.gui.util.Profiler;
|
||||
import io.bitsquare.gui.util.Transitions;
|
||||
import io.bitsquare.trade.TradeManager;
|
||||
@ -222,13 +221,6 @@ public class MainViewCB extends ViewCB<MainPM> {
|
||||
if (ordersButtonButtonPane.getChildren().size() > 1)
|
||||
ordersButtonButtonPane.getChildren().remove(1);
|
||||
}
|
||||
|
||||
if (ImageUtil.isRetina())
|
||||
BitSquare.getPrimaryStage().getIcons().add(new Image(getClass().getResourceAsStream
|
||||
("/images/window_icon@2x.png")));
|
||||
else
|
||||
BitSquare.getPrimaryStage().getIcons().add(new Image(getClass().getResourceAsStream("/images/window_icon" +
|
||||
".png")));
|
||||
}
|
||||
|
||||
private void onMainNavigationAdded() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user