[fixes #249] stylesheet path relative to style_settings

This commit is contained in:
Marcel Paffrath 2017-09-15 14:47:05 +02:00
parent 7496025137
commit 183f9e77c0
2 changed files with 4 additions and 3 deletions

View File

@ -679,11 +679,12 @@ class MainWindow(QMainWindow):
self._styles[style] = stylecolors[style]
self._phasecolors = style_settings.phasecolors
styles_dir = os.path.dirname(style_settings.__file__)
for style, stylecolors in self._styles.items():
stylesheet = stylecolors['stylesheet']['filename']
if stylesheet:
stylesheet_file = open(stylesheet, 'r')
stylesheet_file = open(os.path.join(styles_dir, stylesheet), 'r')
stylesheet = stylesheet_file.read()
stylesheet_file.close()
else:

View File

@ -50,7 +50,7 @@ stylecolors = {
'test': {
'rgba': (130, 190, 100, 255)},
'stylesheet': {
'filename': 'pylot/styles/dark.qss'}
'filename': 'dark.qss'}
},
'bright': {
'linecolor': {
@ -64,7 +64,7 @@ stylecolors = {
'test': {
'rgba': (200, 230, 200, 255)},
'stylesheet': {
'filename': 'pylot/styles/bright.qss'}
'filename': 'bright.qss'}
}
}