181 @return tuple of None and activation status (boolean) |
181 @return tuple of None and activation status (boolean) |
182 """ |
182 """ |
183 global pyramidPluginObject |
183 global pyramidPluginObject |
184 pyramidPluginObject = self |
184 pyramidPluginObject = self |
185 |
185 |
186 self.__object = Project(self, self.__ui) |
186 try: |
|
187 usesDarkPalette = e5App().usesDarkPalette() |
|
188 except AttributeError: |
|
189 from PyQt5.QtGui import QPalette |
|
190 palette = e5App().palette() |
|
191 lightness = palette.color(QPalette.Window).lightness() |
|
192 usesDarkPalette = lightness <= 128 |
|
193 if usesDarkPalette: |
|
194 iconSuffix = "dark" |
|
195 else: |
|
196 iconSuffix = "light" |
|
197 |
|
198 self.__object = Project(self, iconSuffix, self.__ui) |
187 self.__object.initActions() |
199 self.__object.initActions() |
188 e5App().registerPluginObject("ProjectPyramid", self.__object) |
200 e5App().registerPluginObject("ProjectPyramid", self.__object) |
189 |
201 |
190 self.__mainMenu = self.__object.initMenu() |
202 self.__mainMenu = self.__object.initMenu() |
191 |
203 |