[fixes #249] stylesheet path relative to style_settings
This commit is contained in:
parent
7496025137
commit
183f9e77c0
@ -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:
|
||||
|
@ -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'}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user