22 # Start-Of-Header |
22 # Start-Of-Header |
23 name = "Assistant Eric Plugin" |
23 name = "Assistant Eric Plugin" |
24 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
24 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
25 autoactivate = True |
25 autoactivate = True |
26 deactivateable = True |
26 deactivateable = True |
27 version = "4.1.3" |
27 version = "4.2.0" |
28 className = "AssistantEricPlugin" |
28 className = "AssistantEricPlugin" |
29 packageName = "AssistantEric" |
29 packageName = "AssistantEric" |
30 shortDescription = "Alternative autocompletion and calltips provider." |
30 shortDescription = "Alternative autocompletion and calltips provider." |
31 longDescription = \ |
31 longDescription = \ |
32 """This plugin implements an alternative autocompletion and""" \ |
32 """This plugin implements an alternative autocompletion and""" \ |
73 """ |
73 """ |
74 Module function returning data as required by the configuration dialog. |
74 Module function returning data as required by the configuration dialog. |
75 |
75 |
76 @return dictionary containing the relevant data |
76 @return dictionary containing the relevant data |
77 """ |
77 """ |
|
78 try: |
|
79 usesDarkPalette = e5App().usesDarkPalette() |
|
80 except AttributeError: |
|
81 from PyQt5.QtGui import QPalette |
|
82 palette = e5App().palette() |
|
83 lightness = palette.color(QPalette.Window).lightness() |
|
84 usesDarkPalette = lightness <= 128 |
|
85 if usesDarkPalette: |
|
86 iconSuffix = "dark" |
|
87 else: |
|
88 iconSuffix = "light" |
|
89 |
78 return { |
90 return { |
79 "ericAutoCompletionPage": [ |
91 "ericAutoCompletionPage": [ |
80 QCoreApplication.translate("AssistantEricPlugin", "Eric"), |
92 QCoreApplication.translate("AssistantEricPlugin", "Eric"), |
81 os.path.join("AssistantEric", "ConfigurationPages", |
93 os.path.join("AssistantEric", "ConfigurationPages", |
82 "eric.png"), |
94 "eric-{0}".format(iconSuffix)), |
83 createAutoCompletionPage, "editorAutocompletionPage", None], |
95 createAutoCompletionPage, "editorAutocompletionPage", None], |
84 "ericCallTipsPage": [ |
96 "ericCallTipsPage": [ |
85 QCoreApplication.translate("AssistantEricPlugin", "Eric"), |
97 QCoreApplication.translate("AssistantEricPlugin", "Eric"), |
86 os.path.join("AssistantEric", "ConfigurationPages", |
98 os.path.join("AssistantEric", "ConfigurationPages", |
87 "eric.png"), |
99 "eric-{0}".format(iconSuffix)), |
88 createCallTipsPage, "editorCalltipsPage", None], |
100 createCallTipsPage, "editorCalltipsPage", None], |
89 } |
101 } |
90 |
102 |
91 |
103 |
92 def prepareUninstall(): |
104 def prepareUninstall(): |