diff --git a/main/core/pom.xml b/main/core/pom.xml
index 579732a69..04810f00b 100644
--- a/main/core/pom.xml
+++ b/main/core/pom.xml
@@ -12,7 +12,7 @@
org.cryptomator
main
- 0.10.0
+ 0.10.1-SNAPSHOT
core
Cryptomator WebDAV and I/O module
diff --git a/main/crypto-aes/pom.xml b/main/crypto-aes/pom.xml
index fc7dd0958..78ca13d2f 100644
--- a/main/crypto-aes/pom.xml
+++ b/main/crypto-aes/pom.xml
@@ -12,7 +12,7 @@
org.cryptomator
main
- 0.10.0
+ 0.10.1-SNAPSHOT
crypto-aes
Cryptomator cryptographic module (AES)
diff --git a/main/crypto-api/pom.xml b/main/crypto-api/pom.xml
index 7b5276c81..296b6f700 100644
--- a/main/crypto-api/pom.xml
+++ b/main/crypto-api/pom.xml
@@ -12,7 +12,7 @@
org.cryptomator
main
- 0.10.0
+ 0.10.1-SNAPSHOT
crypto-api
Cryptomator cryptographic module API
diff --git a/main/installer-debian/pom.xml b/main/installer-debian/pom.xml
index 005d79d67..83be58073 100644
--- a/main/installer-debian/pom.xml
+++ b/main/installer-debian/pom.xml
@@ -3,7 +3,7 @@
org.cryptomator
main
- 0.10.0
+ 0.10.1-SNAPSHOT
installer-debian
pom
diff --git a/main/installer-osx/pom.xml b/main/installer-osx/pom.xml
index 29830090a..a72e81b35 100644
--- a/main/installer-osx/pom.xml
+++ b/main/installer-osx/pom.xml
@@ -3,7 +3,7 @@
org.cryptomator
main
- 0.10.0
+ 0.10.1-SNAPSHOT
installer-osx
pom
diff --git a/main/installer-win-portable/pom.xml b/main/installer-win-portable/pom.xml
index 3afe132e4..67a52febe 100644
--- a/main/installer-win-portable/pom.xml
+++ b/main/installer-win-portable/pom.xml
@@ -3,7 +3,7 @@
org.cryptomator
main
- 0.10.0
+ 0.10.1-SNAPSHOT
installer-win-portable
pom
diff --git a/main/installer-win/pom.xml b/main/installer-win/pom.xml
index 1663dcc46..9d80938a1 100644
--- a/main/installer-win/pom.xml
+++ b/main/installer-win/pom.xml
@@ -3,7 +3,7 @@
org.cryptomator
main
- 0.10.0
+ 0.10.1-SNAPSHOT
installer-win
pom
diff --git a/main/pom.xml b/main/pom.xml
index f3e4ca069..3e707fbbc 100644
--- a/main/pom.xml
+++ b/main/pom.xml
@@ -11,7 +11,7 @@
4.0.0
org.cryptomator
main
- 0.10.0
+ 0.10.1-SNAPSHOT
pom
Cryptomator
diff --git a/main/uber-jar/pom.xml b/main/uber-jar/pom.xml
index be91464ac..1142d4266 100644
--- a/main/uber-jar/pom.xml
+++ b/main/uber-jar/pom.xml
@@ -12,7 +12,7 @@
org.cryptomator
main
- 0.10.0
+ 0.10.1-SNAPSHOT
uber-jar
pom
diff --git a/main/ui/pom.xml b/main/ui/pom.xml
index 57e1e20d0..214554934 100644
--- a/main/ui/pom.xml
+++ b/main/ui/pom.xml
@@ -12,7 +12,7 @@
org.cryptomator
main
- 0.10.0
+ 0.10.1-SNAPSHOT
ui
Cryptomator GUI
diff --git a/main/ui/src/main/java/org/cryptomator/ui/util/TrayIconUtil.java b/main/ui/src/main/java/org/cryptomator/ui/util/TrayIconUtil.java
index a33513136..9bdf7e85d 100644
--- a/main/ui/src/main/java/org/cryptomator/ui/util/TrayIconUtil.java
+++ b/main/ui/src/main/java/org/cryptomator/ui/util/TrayIconUtil.java
@@ -11,9 +11,7 @@ import java.awt.TrayIcon.MessageType;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.util.ResourceBundle;
-
-import javafx.application.Platform;
-import javafx.stage.Stage;
+import java.util.concurrent.TimeUnit;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
@@ -21,10 +19,16 @@ import javax.script.ScriptException;
import javax.swing.SwingUtilities;
import org.apache.commons.lang3.SystemUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javafx.application.Platform;
+import javafx.stage.Stage;
public final class TrayIconUtil {
private static TrayIconUtil INSTANCE;
+ private static final Logger LOG = LoggerFactory.getLogger(TrayIconUtil.class);
private final Stage mainApplicationWindow;
private final ResourceBundle rb;
@@ -79,10 +83,32 @@ public final class TrayIconUtil {
exitItem.addActionListener(this::quitFromTray);
popup.add(exitItem);
- final Image image = Toolkit.getDefaultToolkit().getImage(TrayIconUtil.class.getResource("/tray_icon.png"));
+ final Image image;
+ if (SystemUtils.IS_OS_MAC_OSX && isMacMenuBarDarkMode()) {
+ image = Toolkit.getDefaultToolkit().getImage(TrayIconUtil.class.getResource("/tray_icon_white.png"));
+ } else {
+ image = Toolkit.getDefaultToolkit().getImage(TrayIconUtil.class.getResource("/tray_icon.png"));
+ }
+
return new TrayIcon(image, rb.getString("app.name"), popup);
}
+ /**
+ * @return true if defaults read -g AppleInterfaceStyle has an exit status of 0 (i.e. _not_ returning "key not found").
+ */
+ private boolean isMacMenuBarDarkMode() {
+ try {
+ // check for exit status only. Once there are more modes than "dark" and "default", we might need to analyze string contents..
+ final Process proc = Runtime.getRuntime().exec(new String[] {"defaults", "read", "-g", "AppleInterfaceStyle"});
+ proc.waitFor(100, TimeUnit.MILLISECONDS);
+ return proc.exitValue() == 0;
+ } catch (IOException | InterruptedException | IllegalThreadStateException ex) {
+ // IllegalThreadStateException thrown by proc.exitValue(), if process didn't terminate
+ LOG.warn("Determining MAC OS X dark mode settings failed. Assuming default (light) mode.");
+ return false;
+ }
+ }
+
private void showTrayNotification(TrayIcon trayIcon) {
final Runnable notificationCmd;
if (SystemUtils.IS_OS_MAC_OSX) {
diff --git a/main/ui/src/main/resources/tray_icon_white.png b/main/ui/src/main/resources/tray_icon_white.png
new file mode 100644
index 000000000..434f5e5aa
Binary files /dev/null and b/main/ui/src/main/resources/tray_icon_white.png differ