diff --git a/src/Mod/Start/Gui/DlgStartPreferences.ui b/src/Mod/Start/Gui/DlgStartPreferences.ui index 8fdb97220f..a2a395e765 100644 --- a/src/Mod/Start/Gui/DlgStartPreferences.ui +++ b/src/Mod/Start/Gui/DlgStartPreferences.ui @@ -7,7 +7,7 @@ 0 0 476 - 581 + 585 @@ -42,7 +42,7 @@ Start page options - + an optional custom folder to be displayed at the bottom of the first page @@ -55,14 +55,14 @@ - + Show additional folder - + @@ -88,21 +88,21 @@ - + Show examples folder contents - + Background color - + @@ -141,7 +141,7 @@ - + false @@ -151,7 +151,7 @@ - + @@ -177,14 +177,14 @@ - + Link color - + an optional image to display as background @@ -197,21 +197,21 @@ - + Switch workbench after loafing - + Page background color - + @@ -237,24 +237,24 @@ - + Background image - + Page text color - + - + @@ -280,7 +280,7 @@ - + @@ -306,14 +306,14 @@ - + Box background color - + @@ -339,7 +339,7 @@ - + false @@ -368,7 +368,7 @@ - + false @@ -378,14 +378,14 @@ - + Close start page after loading - + if you want the examples to show on the first page @@ -407,14 +407,14 @@ - + Background text color - + Should the start page be closed after loading? @@ -433,14 +433,14 @@ - + Close & switch on file open - + If FreeCAD is started by opening a file, apply the two settings above @@ -459,14 +459,14 @@ - + Show forum - + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab @@ -485,6 +485,32 @@ + + + + Use FreeCAD style sheet + + + + + + + If this is checked, if a style sheet is specified in General preferences, it will be used and override the colors below + + + Qt::RightToLeft + + + + + + UseStyleSheet + + + Mod/Start + + + diff --git a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp b/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp index f5b17ee343..ff08ae10f7 100644 --- a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp +++ b/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp @@ -95,6 +95,7 @@ void DlgStartPreferencesImp::saveSettings() checkBox_2->onSave(); checkBox_3->onSave(); checkBox_4->onSave(); + checkBox_5->onSave(); } void DlgStartPreferencesImp::loadSettings() @@ -120,6 +121,7 @@ void DlgStartPreferencesImp::loadSettings() checkBox_2->onRestore(); checkBox_3->onRestore(); checkBox_4->onRestore(); + checkBox_5->onRestore(); } /** diff --git a/src/Mod/Start/StartPage/StartPage.html b/src/Mod/Start/StartPage/StartPage.html index 5a082bbe52..0168dc4ce9 100644 --- a/src/Mod/Start/StartPage/StartPage.html +++ b/src/Mod/Start/StartPage/StartPage.html @@ -4,6 +4,7 @@ +
diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index 0db98c0470..0f90d2a76d 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -166,7 +166,7 @@ def handle(): # build the html page skeleton resources_dir = os.path.join(FreeCAD.getResourceDir(), "Mod", "Start", "StartPage") - p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Start") + p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start") template = p.GetString("Template","") if template: html_filename = template @@ -176,16 +176,24 @@ def handle(): css_filename = os.path.join(resources_dir, "StartPage.css") with open(html_filename, 'r') as f: HTML = f.read() - with open(js_filename, 'r') as f: JS = f.read() - with open(css_filename, 'r') as f: CSS = f.read() HTML = HTML.replace("JS",JS) HTML = HTML.replace("CSS",CSS) + # get the stylesheet if we are using one + + if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("UseStyleSheet",False): + qssfile = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/MainWindow").GetString("StyleSheet","") + if qssfile: + with open(qssfile, 'r') as f: + ALTCSS = f.read().decode("utf8") + HTML = HTML.replace("","") + + # get FreeCAD version v = FreeCAD.Version()