[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._styles[style] = stylecolors[style]
|
||||||
|
|
||||||
self._phasecolors = style_settings.phasecolors
|
self._phasecolors = style_settings.phasecolors
|
||||||
|
styles_dir = os.path.dirname(style_settings.__file__)
|
||||||
|
|
||||||
for style, stylecolors in self._styles.items():
|
for style, stylecolors in self._styles.items():
|
||||||
stylesheet = stylecolors['stylesheet']['filename']
|
stylesheet = stylecolors['stylesheet']['filename']
|
||||||
if stylesheet:
|
if stylesheet:
|
||||||
stylesheet_file = open(stylesheet, 'r')
|
stylesheet_file = open(os.path.join(styles_dir, stylesheet), 'r')
|
||||||
stylesheet = stylesheet_file.read()
|
stylesheet = stylesheet_file.read()
|
||||||
stylesheet_file.close()
|
stylesheet_file.close()
|
||||||
else:
|
else:
|
||||||
|
@ -50,7 +50,7 @@ stylecolors = {
|
|||||||
'test': {
|
'test': {
|
||||||
'rgba': (130, 190, 100, 255)},
|
'rgba': (130, 190, 100, 255)},
|
||||||
'stylesheet': {
|
'stylesheet': {
|
||||||
'filename': 'pylot/styles/dark.qss'}
|
'filename': 'dark.qss'}
|
||||||
},
|
},
|
||||||
'bright': {
|
'bright': {
|
||||||
'linecolor': {
|
'linecolor': {
|
||||||
@ -64,7 +64,7 @@ stylecolors = {
|
|||||||
'test': {
|
'test': {
|
||||||
'rgba': (200, 230, 200, 255)},
|
'rgba': (200, 230, 200, 255)},
|
||||||
'stylesheet': {
|
'stylesheet': {
|
||||||
'filename': 'pylot/styles/bright.qss'}
|
'filename': 'bright.qss'}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user