Skip to content

Commit

Permalink
Removed tango-icon-theme dependency (#224)
Browse files Browse the repository at this point in the history
* Removed tango-icon-theme dependency

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Removed unused import

Signed-off-by: ahcorde <ahcorde@gmail.com>
  • Loading branch information
ahcorde authored Jun 15, 2020
1 parent 8281717 commit db158e0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion qt_gui/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<exec_depend>ament_index_python</exec_depend>
<exec_depend>python_qt_binding</exec_depend>
<exec_depend>python3-catkin-pkg-modules</exec_depend>
<exec_depend>tango-icon-theme</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
Expand Down
18 changes: 0 additions & 18 deletions qt_gui/src/qt_gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

from argparse import ArgumentParser, SUPPRESS
import os
import platform
import signal
import sys

Expand Down Expand Up @@ -191,21 +190,6 @@ def _add_plugin_providers(self):
def _add_reload_paths(self, reload_importer):
reload_importer.add_reload_path(os.path.join(os.path.dirname(__file__), *('..',) * 4))

def _check_icon_theme_compliance(self):
from python_qt_binding.QtGui import QIcon
# TODO find a better way to verify Theme standard compliance
if QIcon.fromTheme('document-save').isNull() or \
QIcon.fromTheme('document-open').isNull() or \
QIcon.fromTheme('edit-cut').isNull() or \
QIcon.fromTheme('object-flip-horizontal').isNull():
if platform.system() == 'Darwin' and \
'/usr/local/share/icons' not in QIcon.themeSearchPaths():
QIcon.setThemeSearchPaths(QIcon.themeSearchPaths() + ['/usr/local/share/icons'])
original_theme = QIcon.themeName()
QIcon.setThemeName('Tango')
if QIcon.fromTheme('document-save').isNull():
QIcon.setThemeName(original_theme)

def create_application(self, argv):
from python_qt_binding.QtCore import Qt
from python_qt_binding.QtWidgets import QApplication
Expand Down Expand Up @@ -445,8 +429,6 @@ def message_handler(type_, context, msg):

app = self.create_application(argv)

self._check_icon_theme_compliance()

settings = QSettings(
QSettings.IniFormat, QSettings.UserScope, 'ros.org', self._settings_filename)
if len(embed_options_set) == 0:
Expand Down

0 comments on commit db158e0

Please sign in to comment.