Implements theme loading without overwriting path
This commit is contained in:
parent
b379a14cd2
commit
17997f4d8e
|
@ -660,7 +660,7 @@ class MiniActuator:
|
||||||
self.theme_name = self.g.config.get('litegui_theme','Cleanlook')
|
self.theme_name = self.g.config.get('litegui_theme','Cleanlook')
|
||||||
self.themes = load_theme_paths()
|
self.themes = load_theme_paths()
|
||||||
# see issue 509
|
# see issue 509
|
||||||
# self.load_theme()
|
self.load_theme()
|
||||||
|
|
||||||
def load_theme(self):
|
def load_theme(self):
|
||||||
"""Load theme retrieved from wallet file."""
|
"""Load theme retrieved from wallet file."""
|
||||||
|
@ -669,8 +669,8 @@ class MiniActuator:
|
||||||
except KeyError:
|
except KeyError:
|
||||||
util.print_error("Theme not found!", self.theme_name)
|
util.print_error("Theme not found!", self.theme_name)
|
||||||
return
|
return
|
||||||
QDir.setCurrent(os.path.join(theme_prefix, theme_path))
|
full_theme_path = ("%s/%s/style.css" % (theme_prefix, theme_path))
|
||||||
with open(rsrc("style.css")) as style_file:
|
with open(rsrc(full_theme_path)) as style_file:
|
||||||
qApp.setStyleSheet(style_file.read())
|
qApp.setStyleSheet(style_file.read())
|
||||||
|
|
||||||
def theme_names(self):
|
def theme_names(self):
|
||||||
|
|
Loading…
Reference in New Issue