StartPage implement custom CSS preference

This commit is contained in:
qewer33
2023-09-03 16:21:49 +03:00
parent a1d20ec97d
commit 5be49a56f9
8 changed files with 191 additions and 57 deletions

View File

@@ -6,7 +6,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script>JS</script>
<style>
CSS
DEFAULT_CSS
CUSTOM_CSS
</style>
<!--QSS-->
</head>

View File

@@ -352,7 +352,8 @@ def handle():
with open(css_filename, 'r') as f:
CSS = f.read()
HTML = HTML.replace("JS",JS)
HTML = HTML.replace("CSS",CSS)
HTML = HTML.replace("DEFAULT_CSS",CSS)
HTML = HTML.replace("CUSTOM_CSS",FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetString("CustomCSS","").replace("\n",""))
# set the language