summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-04-11 20:36:56 +0900
committerkali <kali@leap.se>2013-04-11 20:36:56 +0900
commit92a2fb893b02d1880aac3509b0550fb04d5bf876 (patch)
tree220b0c960d240275f03d8c5aa814e729e11ea76d
parent0cbff90910fa35a9489a5542d093211c61d2267f (diff)
Use dark icons (light theme) for OSX
Closes:#2130
-rw-r--r--changes/feature_2130-dark-eip-icons-osx1
-rw-r--r--data/images/conn_connected-light.pngbin0 -> 426 bytes
-rw-r--r--data/images/conn_connecting-light.pngbin0 -> 791 bytes
-rw-r--r--data/images/conn_error-light.pngbin0 -> 1457 bytes
-rw-r--r--data/resources/mainwindow.qrc5
-rw-r--r--src/leap/gui/mainwindow.py18
-rw-r--r--src/leap/platform_init/__init__.py28
7 files changed, 48 insertions, 4 deletions
diff --git a/changes/feature_2130-dark-eip-icons-osx b/changes/feature_2130-dark-eip-icons-osx
new file mode 100644
index 00000000..b53e6f39
--- /dev/null
+++ b/changes/feature_2130-dark-eip-icons-osx
@@ -0,0 +1 @@
+ o Use dark eip icons os osx. Closes:#2130
diff --git a/data/images/conn_connected-light.png b/data/images/conn_connected-light.png
new file mode 100644
index 00000000..a0db2a22
--- /dev/null
+++ b/data/images/conn_connected-light.png
Binary files differ
diff --git a/data/images/conn_connecting-light.png b/data/images/conn_connecting-light.png
new file mode 100644
index 00000000..83e3ea75
--- /dev/null
+++ b/data/images/conn_connecting-light.png
Binary files differ
diff --git a/data/images/conn_error-light.png b/data/images/conn_error-light.png
new file mode 100644
index 00000000..8cee20fe
--- /dev/null
+++ b/data/images/conn_error-light.png
Binary files differ
diff --git a/data/resources/mainwindow.qrc b/data/resources/mainwindow.qrc
index ae7a50e4..655f2812 100644
--- a/data/resources/mainwindow.qrc
+++ b/data/resources/mainwindow.qrc
@@ -4,12 +4,15 @@
<file>../images/leap-gray-big.png</file>
<file>../images/Blue-Arrow-Right-32.png</file>
<file>../images/Globe.png</file>
- <file>../images/conn_error.png</file>
<file>../images/leap-color-big.png</file>
<file>../images/Arrow-Down-32.png</file>
<file>../images/Arrow-Up-32.png</file>
<file>../images/conn_connecting.png</file>
<file>../images/conn_connected.png</file>
+ <file>../images/conn_error.png</file>
+ <file>../images/conn_connecting-light.png</file>
+ <file>../images/conn_connected-light.png</file>
+ <file>../images/conn_error-light.png</file>
<file>../images/leap-color-small.png</file>
<file>../images/Dialog-accept.png</file>
<file>../images/Dialog-error.png</file>
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 0d59e24b..d9e8e3f6 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -34,6 +34,7 @@ from leap.gui.wizard import Wizard
from leap.services.eip.eipbootstrapper import EIPBootstrapper
from leap.services.eip.eipconfig import EIPConfig
from leap.services.eip.providerbootstrapper import ProviderBootstrapper
+from leap.platform_init import IS_MAC
from leap.platform_init.initializers import init_platform
from leap.services.eip.vpn import VPN
from leap.services.eip.vpnlaunchers import (VPNLauncherException,
@@ -81,9 +82,20 @@ class MainWindow(QtGui.QMainWindow):
callback=self._new_updates_available)
self._updates_content = ""
- self.CONNECTING_ICON = QtGui.QPixmap(":/images/conn_connecting.png")
- self.CONNECTED_ICON = QtGui.QPixmap(":/images/conn_connected.png")
- self.ERROR_ICON = QtGui.QPixmap(":/images/conn_error.png")
+ if IS_MAC:
+ EIP_ICONS = (
+ ":/images/conn_connecting-light.png"
+ ":/images/conn_connected-light.png",
+ ":/images/conn_error-light.png")
+ else:
+ EIP_ICONS = (
+ ":/images/conn_connecting.png"
+ ":/images/conn_connected.png",
+ ":/images/conn_error.png")
+
+ self.CONNECTING_ICON = QtGui.QPixmap(EIP_ICONS[0])
+ self.CONNECTED_ICON = QtGui.QPixmap(EIP_ICONS[1])
+ self.ERROR_ICON = QtGui.QPixmap(EIP_ICONS[2])
self.LOGGED_OUT_ICON = QtGui.QPixmap(":/images/leap-gray-big.png")
self.LOGGED_IN_ICON = QtGui.QPixmap(":/images/leap-color-big.png")
diff --git a/src/leap/platform_init/__init__.py b/src/leap/platform_init/__init__.py
index e69de29b..2a262a30 100644
--- a/src/leap/platform_init/__init__.py
+++ b/src/leap/platform_init/__init__.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+# __init__.py
+# Copyright (C) 2013 LEAP
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+"""
+System constants
+"""
+import platform
+
+_system = platform.system()
+
+IS_WIN = True if _system == "Windows" else False
+IS_MAC = True if _system == "Darwin" else False
+IS_LINUX = True if _system == "Linux" else False
+IS_UNIX = IS_MAC or IS_LINUX