mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 10:22:18 +01:00
Use separate icons for windows and linux
This commit is contained in:
parent
2be612513f
commit
ff0b4c46d1
@ -26,6 +26,7 @@ import io.bitsquare.gui.components.Popups;
|
||||
import io.bitsquare.gui.util.ImageUtil;
|
||||
import io.bitsquare.persistence.Persistence;
|
||||
import io.bitsquare.user.User;
|
||||
import io.bitsquare.util.Utilities;
|
||||
|
||||
import com.google.common.base.Throwables;
|
||||
|
||||
@ -122,8 +123,17 @@ public class BitsquareApp extends Application {
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.setMinWidth(75);
|
||||
primaryStage.setMinHeight(50);
|
||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(
|
||||
ImageUtil.isRetina() ? "/images/window_icon@2x.png" : "/images/window_icon.png")));
|
||||
|
||||
// on windows the title icon is also used as task bar icon in a larger size
|
||||
// on Linux no title icon is supported but also a large task bar icon is derived form that title icon
|
||||
String iconPath;
|
||||
if (Utilities.isOSX())
|
||||
iconPath = ImageUtil.isRetina() ? "/images/window_icon@2x.png" : "/images/window_icon.png";
|
||||
else
|
||||
iconPath = "/images/taskbar_icon.png";
|
||||
|
||||
if (iconPath != null)
|
||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(iconPath)));
|
||||
|
||||
|
||||
// make the UI visible
|
||||
|
@ -42,8 +42,9 @@ public class SystemTray {
|
||||
|
||||
private static final String ICON_HI_RES = "/images/system_tray_icon@2x.png";
|
||||
private static final String ICON_LO_RES = "/images/system_tray_icon.png";
|
||||
private static final String ICON_ALT = "/images/system_tray_icon_alt.png";
|
||||
|
||||
private static final String ICON_WINDOWS = "/images/system_tray_icon_windows.png";
|
||||
private static final String ICON_LINUX = "/images/system_tray_icon_linux.png";
|
||||
|
||||
|
||||
private static final String SHOW_WINDOW_LABEL = "Show exchange window";
|
||||
private static final String HIDE_WINDOW_LABEL = "Hide exchange window";
|
||||
@ -82,8 +83,10 @@ public class SystemTray {
|
||||
String path;
|
||||
if (Utilities.isOSX())
|
||||
path = ImageUtil.isRetina() ? ICON_HI_RES : ICON_LO_RES;
|
||||
else if (Utilities.isWindows())
|
||||
path = ICON_WINDOWS;
|
||||
else
|
||||
path = ICON_ALT;
|
||||
path = ICON_LINUX;
|
||||
|
||||
try {
|
||||
BufferedImage trayIconImage = ImageIO.read(getClass().getResource(path));
|
||||
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
BIN
src/main/resources/images/taskbar_icon.png
Normal file
BIN
src/main/resources/images/taskbar_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
Loading…
Reference in New Issue
Block a user