diff --git a/src/Mod/Start/Gui/DlgStartPreferences.ui b/src/Mod/Start/Gui/DlgStartPreferences.ui index cdddf625e6..dfe30aa62a 100644 --- a/src/Mod/Start/Gui/DlgStartPreferences.ui +++ b/src/Mod/Start/Gui/DlgStartPreferences.ui @@ -7,7 +7,7 @@ 0 0 482 - 769 + 795 @@ -146,6 +146,32 @@ + + + + Show tips + + + + + + + Qt::RightToLeft + + + + + + true + + + ShowTips + + + Mod/Start + + + @@ -545,12 +571,12 @@ - - Qt::RightToLeft - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon + + Qt::RightToLeft + diff --git a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp b/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp index 8e151c32b9..4bb516bf2d 100644 --- a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp +++ b/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp @@ -110,6 +110,7 @@ void DlgStartPreferencesImp::saveSettings() ui->checkBox_4->onSave(); ui->checkBox_5->onSave(); ui->checkBox_6->onSave(); + ui->checkBox_7->onSave(); ui->lineEdit->onSave(); ui->spinBox->onSave(); } @@ -140,6 +141,7 @@ void DlgStartPreferencesImp::loadSettings() ui->checkBox_4->onRestore(); ui->checkBox_5->onRestore(); ui->checkBox_6->onRestore(); + ui->checkBox_7->onRestore(); ui->lineEdit->onRestore(); ui->spinBox->onRestore(); } diff --git a/src/Mod/Start/StartPage/CMakeLists.txt b/src/Mod/Start/StartPage/CMakeLists.txt index 147e4781ce..ef969cf37d 100644 --- a/src/Mod/Start/StartPage/CMakeLists.txt +++ b/src/Mod/Start/StartPage/CMakeLists.txt @@ -14,6 +14,7 @@ SET(StartPage_PythonResources StartPage.js StartPage.html EnableDownload.py + OpenSettings.py ) SET(StartPage_ImageResources @@ -24,6 +25,7 @@ SET(StartPage_ImageResources images/freecad.png images/installed.png images/new_file_thumbnail.svg + images/settings.png ) SET(StartPage_Resources diff --git a/src/Mod/Start/StartPage/OpenSettings.py b/src/Mod/Start/StartPage/OpenSettings.py new file mode 100644 index 0000000000..3714ffd327 --- /dev/null +++ b/src/Mod/Start/StartPage/OpenSettings.py @@ -0,0 +1,24 @@ +#*************************************************************************** +#* * +#* Copyright (c) 2020 Yorik van Havre * +#* * +#* This program is free software; you can redistribute it and/or modify * +#* it under the terms of the GNU Lesser General Public License (LGPL) * +#* as published by the Free Software Foundation; either version 2 of * +#* the License, or (at your option) any later version. * +#* for detail see the LICENCE text file. * +#* * +#* This program is distributed in the hope that it will be useful, * +#* but WITHOUT ANY WARRANTY; without even the implied warranty of * +#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +#* GNU Library General Public License for more details. * +#* * +#* You should have received a copy of the GNU Library General Public * +#* License along with this program; if not, write to the Free Software * +#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +#* USA * +#* * +#*************************************************************************** + +import FreeCADGui +FreeCADGui.showPreferences("Start") diff --git a/src/Mod/Start/StartPage/StartPage.css b/src/Mod/Start/StartPage/StartPage.css index 9f4d9037c5..d2b8868407 100644 --- a/src/Mod/Start/StartPage/StartPage.css +++ b/src/Mod/Start/StartPage/StartPage.css @@ -27,7 +27,13 @@ hr { .version { font-size: 0.8em; float: right; - padding-right: 40px; + padding-right: 10px; +} +.settingsicon { + width: 16px; + height: 16px; + margin-left: 20px; + vertical-align:middle; } .container { margin: 2% @@ -152,7 +158,7 @@ h3 a { } .footnote { text-align: center; - display: block; + display: block; /* footnote tips display */ clear: both; padding-top: 10px; } diff --git a/src/Mod/Start/StartPage/StartPage.html b/src/Mod/Start/StartPage/StartPage.html index ca3b28fd29..346eedff7e 100644 --- a/src/Mod/Start/StartPage/StartPage.html +++ b/src/Mod/Start/StartPage/StartPage.html @@ -9,7 +9,12 @@
-
VERSIONSTRING
+
+ VERSIONSTRING + + + +
  • T_DOCUMENTS
  • diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index 76e94c3a5c..59832d82f4 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -303,6 +303,11 @@ def handle(): ALTCSS = encode(f.read()) HTML = HTML.replace("","") + # turn tips off if needed + + if not FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("ShowTips",True): + HTML = HTML.replace("display: block; /* footnote tips display */","display: none; /* footnote tips display */") + # get FreeCAD version v = FreeCAD.Version() @@ -394,6 +399,7 @@ def handle(): HTML = HTML.replace("IMAGE_SRC_POWERHUB",'file:///'+os.path.join(resources_dir, 'images/poweruserhub.png')) HTML = HTML.replace("IMAGE_SRC_DEVHUB",'file:///'+os.path.join(resources_dir, 'images/developerhub.png')) HTML = HTML.replace("IMAGE_SRC_MANUAL",'file:///'+os.path.join(resources_dir, 'images/manual.png')) + HTML = HTML.replace("IMAGE_SRC_SETTINGS",'file:///'+os.path.join(resources_dir, 'images/settings.png')) imagepath= 'file:///'+os.path.join(resources_dir, 'images/installed.png') imagepath = imagepath.replace('\\','/') # replace Windows backslash with slash to make the path javascript compatible HTML = HTML.replace("IMAGE_SRC_INSTALLED",imagepath) diff --git a/src/Mod/Start/StartPage/images/settings.png b/src/Mod/Start/StartPage/images/settings.png new file mode 100644 index 0000000000..838f8eb8a0 Binary files /dev/null and b/src/Mod/Start/StartPage/images/settings.png differ diff --git a/src/Mod/Start/StartPage/images/settings.svg b/src/Mod/Start/StartPage/images/settings.svg new file mode 100644 index 0000000000..691cfd8303 --- /dev/null +++ b/src/Mod/Start/StartPage/images/settings.svg @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + +