Preferences/__init__.py

branch
5_1_x
changeset 951
08ecc72adb94
parent 887
ccc601bc1faf
child 1124
0663c41e24b9
equal deleted inserted replaced
950:1138e347c653 951:08ecc72adb94
1325 @param prefClass preferences class used as the storage area 1325 @param prefClass preferences class used as the storage area
1326 @return the requested editor colour 1326 @return the requested editor colour
1327 """ 1327 """
1328 col = prefClass.settings.value("Editor/Colour/" + key) 1328 col = prefClass.settings.value("Editor/Colour/" + key)
1329 if col is not None: 1329 if col is not None:
1330 if len(col) == 9:
1331 # color string with alpha
1332 col = "#" + col[3:]
1330 return QtGui.QColor(col) 1333 return QtGui.QColor(col)
1331 else: 1334 else:
1332 return prefClass.editorColourDefaults[key] 1335 return prefClass.editorColourDefaults[key]
1333 1336
1334 def setEditorColour(key, value, prefClass = Prefs): 1337 def setEditorColour(key, value, prefClass = Prefs):

eric ide

mercurial