set dark theme in preview if the main window has it

gh-pages
somas95 2018-04-15 19:19:03 +02:00
parent a318d47e6b
commit 8abc388486
3 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,6 @@
@import("uberwriter.css")
body {
color: #EDEDED;
background-color: #333;
}

View File

@ -703,12 +703,18 @@ class UberwriterWindow(Window):
base_path = ''
os.environ['PANDOC_PREFIX'] = base_path + '/'
# Set the styles according the color theme
if self.settings.get_value("dark-mode"):
stylesheet = helpers.get_media_path('uberwriter_dark.css')
else:
stylesheet = helpers.get_media_path('uberwriter.css')
args = ['pandoc',
'-s',
'--from=markdown',
'--to=html5',
'--mathjax',
'--css=' + helpers.get_media_path('uberwriter.css'),
'--css=' + stylesheet,
'--lua-filter=' + helpers.get_script_path('relative_to_absolute.lua'),
'--lua-filter=' + helpers.get_script_path('task-list.lua')]