Fixed the icon of the translator widget toolboxes layout. eric7

Sat, 11 Sep 2021 12:48:59 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 11 Sep 2021 12:48:59 +0200
branch
eric7
changeset 8590
3663b9de2121
parent 8589
1dfe74571153
child 8591
7cf4b7bc3d5a

Fixed the icon of the translator widget toolboxes layout.

eric7/Plugins/UiExtensionPlugins/Translator/Translator.py file | annotate | diff | comparison | revisions
diff -r 1dfe74571153 -r 3663b9de2121 eric7/Plugins/UiExtensionPlugins/Translator/Translator.py
--- a/eric7/Plugins/UiExtensionPlugins/Translator/Translator.py	Fri Sep 10 19:53:40 2021 +0200
+++ b/eric7/Plugins/UiExtensionPlugins/Translator/Translator.py	Sat Sep 11 12:48:59 2021 +0200
@@ -52,11 +52,14 @@
         from .TranslatorWidget import TranslatorWidget
         
         self.__widget = TranslatorWidget(self.__plugin, self)
+        if self.__ui.getLayoutType() == "Sidebars":
+            iconName = "sbTranslator96"
+        else:
+            iconName = "flag-{0}".format(self.__iconSuffix)
         self.__ui.addSideWidget(
             self.__ui.BottomSide, self.__widget,
             UI.PixmapCache.getIcon(
-                os.path.join(os.path.dirname(__file__),
-                             "icons", "sbTranslator96")),
+                os.path.join(os.path.dirname(__file__), "icons", iconName)),
             self.tr("Translator"))
         
         self.__activateAct = EricAction(

eric ide

mercurial