diff --git a/src/Gui/PreferencePacks/Classic/Classic.cfg b/src/Gui/PreferencePacks/Classic/Classic.cfg index 3b8c7de79b..763d721adb 100644 --- a/src/Gui/PreferencePacks/Classic/Classic.cfg +++ b/src/Gui/PreferencePacks/Classic/Classic.cfg @@ -37,7 +37,7 @@ - + diff --git a/src/Mod/Start/Gui/DlgStartPreferences.ui b/src/Mod/Start/Gui/DlgStartPreferences.ui index 1ebc5769b1..a88215a6db 100644 --- a/src/Mod/Start/Gui/DlgStartPreferences.ui +++ b/src/Mod/Start/Gui/DlgStartPreferences.ui @@ -6,8 +6,8 @@ 0 0 - 401 - 690 + 548 + 894 @@ -21,7 +21,7 @@ - + An optional HTML template that will be used instead of the default start page. @@ -42,71 +42,6 @@ Contents - - - - Displays help tips in the Start workbench Documents tab - - - Qt::RightToLeft - - - - - - true - - - ShowTips - - - Mod/Start - - - - - - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - - - Qt::RightToLeft - - - - - - ShowNotes - - - Mod/Start - - - - - - - Show notepad - - - - - - - An optional custom folder to be displayed at the bottom of the first page. -By using ";;" to separate paths, you can add several folders here - - - Gui::FileChooser::Directory - - - ShowCustomFolder - - - Mod/Start - - - @@ -114,36 +49,10 @@ By using ";;" to separate paths, you can add several folders here - - + + - Show forum - - - - - - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - - - Qt::RightToLeft - - - - - - ShowForum - - - Mod/Start - - - - - - - Show examples folder contents + Show additional folder @@ -169,10 +78,60 @@ By using ";;" to separate paths, you can add several folders here - - + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + + + Qt::RightToLeft + - Show additional folder + + + + ShowForum + + + Mod/Start + + + + + + + Qt::RightToLeft + + + + + + true + + + ShowFileThumbnailIcons + + + Mod/Start + + + + + + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + + + Qt::RightToLeft + + + + + + ShowNotes + + + Mod/Start @@ -183,6 +142,34 @@ By using ";;" to separate paths, you can add several folders here + + + + Show notepad + + + + + + + Show forum + + + + + + + An optional custom folder to be displayed at the bottom of the first page. +By using ";;" to separate paths, you can add several folders here + + + ShowCustomFolder + + + Mod/Start + + + @@ -202,6 +189,109 @@ By using ";;" to separate paths, you can add several folders here + + + + Show file thumbnails + + + + + + + Show examples folder contents + + + + + + + Displays help tips in the Start workbench Documents tab + + + Qt::RightToLeft + + + + + + true + + + ShowTips + + + Mod/Start + + + + + + + + 0 + 0 + + + + File thumbnail size + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 100 + 16777215 + + + + The size of file thumbnail icons in recent files and examples sections + + + Qt::LeftToRight + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + px + + + 32 + + + 128 + + + 128 + + + FileThumbnailIconsSize + + + Mod/Start + + + + + @@ -255,7 +345,7 @@ By using ";;" to separate paths, you can add several folders here The background color behind the panels - + 79 88 @@ -294,7 +384,7 @@ By using ";;" to separate paths, you can add several folders here The down gradient for the background color (currently unsupported) - + 127 158 @@ -317,7 +407,7 @@ By using ";;" to separate paths, you can add several folders here - + An optional image to display as background @@ -347,11 +437,11 @@ By using ";;" to separate paths, you can add several folders here The color of the version text - + - 255 - 251 - 247 + 95 + 95 + 95 @@ -380,7 +470,7 @@ By using ";;" to separate paths, you can add several folders here The background of the main start page area - + 255 255 @@ -413,7 +503,7 @@ By using ";;" to separate paths, you can add several folders here The color of the text on the main pages - + 0 0 @@ -446,7 +536,7 @@ By using ";;" to separate paths, you can add several folders here The background color of the boxes inside the pages - + 221 221 @@ -479,7 +569,7 @@ By using ";;" to separate paths, you can add several folders here The color of the links - + 0 0 diff --git a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp b/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp index 67b13bb85d..eab8120c2b 100644 --- a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp +++ b/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp @@ -111,6 +111,8 @@ void DlgStartPreferencesImp::saveSettings() ui->checkBox_7->onSave(); ui->lineEdit->onSave(); ui->spinBox->onSave(); + ui->showFileThumbnailIconsCheckBox->onSave(); + ui->fileThumbnailIconSizeSpinBox->onSave(); } void DlgStartPreferencesImp::loadSettings() @@ -142,6 +144,8 @@ void DlgStartPreferencesImp::loadSettings() ui->checkBox_7->onRestore(); ui->lineEdit->onRestore(); ui->spinBox->onRestore(); + ui->showFileThumbnailIconsCheckBox->onRestore(); + ui->fileThumbnailIconSizeSpinBox->onRestore(); } /** diff --git a/src/Mod/Start/StartPage/StartPage.css b/src/Mod/Start/StartPage/StartPage.css index 418427efde..60bb15dfc1 100644 --- a/src/Mod/Start/StartPage/StartPage.css +++ b/src/Mod/Start/StartPage/StartPage.css @@ -1,3 +1,10 @@ +/* + * !!! WARNING !!! + * DO NOT change lines that have comment labels right beside them + * these lines are marked with "don't change this line" + * they get replaced by StartPage.py according to the preferences +*/ + /* --- MAIN --- */ html { @@ -150,8 +157,10 @@ ul.tabs li a.active:hover { } .footnote { - text-align: center; + /* don't change this line */ display: block; /* footnote tips display */ + color: BGTCOLOR; + text-align: center; clear: both; padding-top: 10px; } @@ -173,23 +182,26 @@ ul.icons { .file-card { list-style: none; display: inline; - padding: 10px 0px 15px 10px; - width: 138px; - height: 200px; + padding: 10px; + width: 130px; + height: THUMBCARDSIZE; background: BOXCOLOR; border-radius: 8px; margin: 10px; word-wrap: break-word; + text-align: center; } .file-card h4 { - margin: 3px 0; - max-width: 90%; + margin: 5px 0; } .file-card img { - width: 128px; - height: 128px; + /* don't change this line */ + display: block; /* thumb icons display */ + margin: auto; + width: THUMBSIZE; + height: THUMBSIZE; border-radius: 4px; } @@ -238,8 +250,8 @@ a .caption:visited { } .quickstart-button-card img { - width: 64px; - height: 64px; + width: 60px; + height: 60px; margin-right: 10px; } @@ -248,8 +260,8 @@ a .caption:visited { } .notes { - display: none; /* notes display */ /* don't change this line */ + display: none; /* notes display */ width: 100%; } @@ -343,8 +355,8 @@ ul.addonslist { } .forum { - display: none; /* forum display */ /* don't change this line */ + display: none; /* forum display */ } .forum pre { diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index a6178eea8a..803044d944 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -390,6 +390,16 @@ def handle(): ALTCSS = f.read() HTML = HTML.replace("","") + # handle file thumbnail icons visiblity and size + + if not FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("ShowFileThumbnailIcons",True): + HTML = HTML.replace("display: block; /* thumb icons display */","display: none; /* thumb icons display */") + HTML = HTML.replace("THUMBCARDSIZE","75px") + + thumb_icons_size = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetInt("FileThumbnailIconsSize", 128) + HTML = HTML.replace("THUMBSIZE",str(thumb_icons_size)+"px") + HTML = HTML.replace("THUMBCARDSIZE",str(thumb_icons_size + 75)+"px") + # turn tips off if needed if not FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("ShowTips",True): @@ -602,7 +612,7 @@ def handle(): BASECOLOR = gethexcolor(p.GetUnsigned("PageColor",4294967295)) BOXCOLOR = gethexcolor(p.GetUnsigned("BoxColor",3722305023)) TEXTCOLOR = gethexcolor(p.GetUnsigned("PageTextColor",255)) - BGTCOLOR = gethexcolor(p.GetUnsigned("BackgroundTextColor",4294703103)) + BGTCOLOR = gethexcolor(p.GetUnsigned("BackgroundTextColor",1600086015)) OVERFLOW = "" if p.GetBool("ShowScrollBars",True) else "body::-webkit-scrollbar {display: none;}" SHADOW = "#888888" if QtGui.QColor(BASECOLOR).valueF() < 0.5: # dark page - we need to make darker shadows