Fixes default white icon behaviour for Ubuntu GNOME

XDG_CURRENT_DESKTOP returns 'ubuntu:GNOME' and not 'GNOME'.
With this fix, vorta's tray icon defaults also on Ubuntu GNOME to white
This commit is contained in:
Julian Hofer 2019-04-14 20:33:32 +02:00
parent cfe5526a56
commit ebbe1b7c62
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ def init_db(con):
s.value = bool(uses_dark_mode())
if created and setting['key'] == "use_light_icon":
# Check if macOS with enabled dark mode or Linux with GNOME DE
s.value = bool(uses_dark_mode()) or os.environ.get('XDG_CURRENT_DESKTOP', '') == 'GNOME'
s.value = bool(uses_dark_mode()) or 'GNOME' in os.environ.get('XDG_CURRENT_DESKTOP', '')
s.label = setting['label']
s.save()