src/eric7/Preferences/ThemeManager.py

branch
eric7
changeset 10926
9ef616cd220d
parent 10459
5c5ed40d533d
child 11090
f5f5f5803935
equal deleted inserted replaced
10925:22c3928a1ab5 10926:9ef616cd220d
11 import os 11 import os
12 import re 12 import re
13 13
14 from PyQt6.QtCore import QObject 14 from PyQt6.QtCore import QObject
15 15
16 from eric7 import Globals, Preferences 16 from eric7 import EricUtilities, Preferences
17 from eric7.EricWidgets import EricFileDialog, EricMessageBox 17 from eric7.EricWidgets import EricFileDialog, EricMessageBox
18 from eric7.Globals import getConfig 18 from eric7.Globals import getConfig
19 19
20 20
21 class ThemeManager(QObject): 21 class ThemeManager(QObject):
84 return False 84 return False
85 85
86 # step 1: process stylesheet data 86 # step 1: process stylesheet data
87 stylesheetDict = themeDict["stylesheet"] 87 stylesheetDict = themeDict["stylesheet"]
88 if stylesheetDict["name"]: 88 if stylesheetDict["name"]:
89 stylesheetsDir = os.path.join(Globals.getConfigDir(), "stylesheets") 89 stylesheetsDir = os.path.join(
90 EricUtilities.getConfigDir(), "stylesheets"
91 )
90 if not os.path.exists(stylesheetsDir): 92 if not os.path.exists(stylesheetsDir):
91 os.makedirs(stylesheetsDir) 93 os.makedirs(stylesheetsDir)
92 stylesheetFile = os.path.join(stylesheetsDir, stylesheetDict["name"]) 94 stylesheetFile = os.path.join(stylesheetsDir, stylesheetDict["name"])
93 ok = ( 95 ok = (
94 EricMessageBox.yesNo( 96 EricMessageBox.yesNo(

eric ide

mercurial