From 87d9fb576fbc808775a2d80b4951b3da8bceba7c Mon Sep 17 00:00:00 2001 From: qewer33 Date: Sun, 3 Sep 2023 16:33:50 +0300 Subject: [PATCH] Fix StartPage preference widget names --- src/Mod/Start/Gui/DlgStartPreferences.ui | 686 +++++++++---------- src/Mod/Start/Gui/DlgStartPreferencesImp.cpp | 72 +- 2 files changed, 379 insertions(+), 379 deletions(-) diff --git a/src/Mod/Start/Gui/DlgStartPreferences.ui b/src/Mod/Start/Gui/DlgStartPreferences.ui index 032a8fc33c..d41d2b90ec 100644 --- a/src/Mod/Start/Gui/DlgStartPreferences.ui +++ b/src/Mod/Start/Gui/DlgStartPreferences.ui @@ -14,6 +14,81 @@ General + + + + Options + + + + + + Switch workbench after loading + + + + + + + Choose which workbench to switch to after the program launches + + + + + + + Close start page after loading + + + + + + + If checked, will automatically close the Start page when FreeCAD launches + + + Qt::RightToLeft + + + + + + closeStart + + + Mod/Start + + + + + + + Close and switch on opening file + + + + + + + If application is started by opening a file, apply the two settings above + + + Qt::RightToLeft + + + + + + DoNotShowOnOpen + + + Mod/Start + + + + + + @@ -35,7 +110,7 @@ - + If you want the examples to show on the first page @@ -57,7 +132,7 @@ - + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab @@ -95,7 +170,7 @@ - + Shows a notepad next to the file thumbnails, where you can keep notes across sessions @@ -135,7 +210,7 @@ - + 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 @@ -149,7 +224,7 @@ By using ";;" to separate paths, you can add several folders here - + Qt::RightToLeft @@ -182,7 +257,7 @@ By using ";;" to separate paths, you can add several folders here - + Displays help tips in the Start workbench Documents tab @@ -246,7 +321,7 @@ By using ";;" to separate paths, you can add several folders hereQt::LeftToRight - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter px @@ -279,232 +354,8 @@ By using ";;" to separate paths, you can add several folders hereFonts and colors - - - - Use FreeCAD style sheet - - - - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - - - Qt::RightToLeft - - - - - - UseStyleSheet - - - Mod/Start - - - - - - - Background color - - - - - - - - 60 - 60 - - - - The background color behind the panels - - - - 79 - 88 - 116 - - - - BackgroundColor1 - - - Mod/Start - - - - - - - false - - - Background color down gradient - - - - - - - false - - - - 60 - 60 - - - - The down gradient for the background color (currently unsupported) - - - - 127 - 158 - 181 - - - - BackgroundColor2 - - - Mod/Start - - - - - - - Background image - - - - - - - An optional image to display as background - - - BackgroundImage - - - Mod/Start - - - - - - - Background text color - - - - - - - - 60 - 60 - - - - The color of the version text - - - - 95 - 95 - 95 - - - - BackgroundTextColor - - - Mod/Start - - - - - - - Page background color - - - - - - - - 60 - 60 - - - - The background of the main start page area - - - - 255 - 255 - 255 - - - - PageColor - - - Mod/Start - - - - - - - Page text color - - - - - - - - 60 - 60 - - - - The color of the text on the main pages - - - - 0 - 0 - 0 - - - - PageTextColor - - - Mod/Start - - - - - - - Box background color - - - - - + + 60 @@ -529,15 +380,22 @@ By using ";;" to separate paths, you can add several folders here - - + + - Link color + Page text color - - + + + + Page background color + + + + + 60 @@ -545,83 +403,24 @@ By using ";;" to separate paths, you can add several folders here - The color of the links + The background of the main start page area - 0 - 0 + 255 + 255 255 - LinkColor + PageColor Mod/Start - - - - Font family - - - - - - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - - - - - - Arial,Helvetica,sans - - - FontFamily - - - Mod/Start - - - - - - - The base font size to use for all texts of the Start page - - - px - - - 13 - - - FontSize - - - Mod/Start - - - - - - - - - false - - - Open links - - - - + @@ -660,66 +459,195 @@ By using ";;" to separate paths, you can add several folders here - - - - - - - Options - - - - + + - Switch workbench after loading + Font family - - + + + + false + + + Open links + + + + + + + + 60 + 60 + + - Choose which workbench to switch to after the program launches + The background color behind the panels - - - - - - Close start page after loading - - - - - - - If checked, will automatically close the Start page when FreeCAD launches - - - Qt::RightToLeft - - - + + + 79 + 88 + 116 + - closeStart + BackgroundColor1 Mod/Start + + + + Use FreeCAD style sheet + + + + + + + false + + + Background color down gradient + + + + + + + false + + + + 60 + 60 + + + + The down gradient for the background color (currently unsupported) + + + + 127 + 158 + 181 + + + + BackgroundColor2 + + + Mod/Start + + + + + + + Box background color + + + - + - Close and switch on opening file + Background color - - + + + + Background text color + + + + + + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + + + + + + Arial,Helvetica,sans + + + FontFamily + + + Mod/Start + + + + + + + The base font size to use for all texts of the Start page + + + px + + + 13 + + + FontSize + + + Mod/Start + + + + + + + + + + 60 + 60 + + - If application is started by opening a file, apply the two settings above + The color of the links + + + + 0 + 0 + 255 + + + + LinkColor + + + Mod/Start + + + + + + + Link color + + + + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below Qt::RightToLeft @@ -728,13 +656,85 @@ By using ";;" to separate paths, you can add several folders here - DoNotShowOnOpen + UseStyleSheet Mod/Start + + + + + 60 + 60 + + + + The color of the version text + + + + 95 + 95 + 95 + + + + BackgroundTextColor + + + Mod/Start + + + + + + + + 60 + 60 + + + + The color of the text on the main pages + + + + 0 + 0 + 0 + + + + PageTextColor + + + Mod/Start + + + + + + + An optional image to display as background + + + BackgroundImage + + + Mod/Start + + + + + + + Background image + + + diff --git a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp b/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp index efe2bf6169..ac01f1c6d2 100644 --- a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp +++ b/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp @@ -94,27 +94,27 @@ void DlgStartPreferencesImp::saveSettings() App::GetApplication() .GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Start") ->SetASCII("AutoloadModule", startWbName.toLatin1()); - ui->colorButton_1->onSave(); - ui->colorButton_2->onSave(); - ui->colorButton_3->onSave(); - ui->colorButton_4->onSave(); - ui->colorButton_5->onSave(); - ui->colorButton_6->onSave(); + ui->backgroundColorButton->onSave(); + ui->backgroundTextColorButton->onSave(); + ui->pageBackgroundColorButton->onSave(); + ui->pageTextColorButton->onSave(); + ui->boxBackgroundColorButton->onSave(); + ui->linkColorButton->onSave(); ui->colorButton_7->onSave(); - ui->fileChooser_2->onSave(); - ui->fileChooser_3->onSave(); + ui->backgroundImageFileChooser->onSave(); + ui->showAdditionalFolderFileChooser->onSave(); ui->radioButton_1->onSave(); ui->radioButton_2->onSave(); - ui->checkBox->onSave(); - ui->checkBox_1->onSave(); - ui->checkBox_2->onSave(); - ui->checkBox_3->onSave(); - ui->checkBox_4->onSave(); - ui->checkBox_5->onSave(); - ui->checkBox_6->onSave(); - ui->checkBox_7->onSave(); - ui->lineEdit->onSave(); - ui->spinBox->onSave(); + ui->showNotepadCheckBox->onSave(); + ui->showExamplesCheckBox->onSave(); + ui->closeStartCheckBox->onSave(); + ui->closeAndSwitchCheckBox->onSave(); + ui->showForumCheckBox->onSave(); + ui->useStyleSheetCheckBox->onSave(); + ui->showTipsCheckBox->onSave(); + ui->showScrollbarsCheckBox->onSave(); + ui->fontLineEdit->onSave(); + ui->fontSizeSpinBox->onSave(); ui->showFileThumbnailIconsCheckBox->onSave(); ui->fileThumbnailIconSizeSpinBox->onSave(); } @@ -127,27 +127,27 @@ void DlgStartPreferencesImp::loadSettings() ->GetASCII("AutoloadModule", start.c_str()); QString startWbName = QLatin1String(start.c_str()); ui->AutoloadModuleCombo->setCurrentIndex(ui->AutoloadModuleCombo->findData(startWbName)); - ui->colorButton_1->onRestore(); - ui->colorButton_2->onRestore(); - ui->colorButton_3->onRestore(); - ui->colorButton_4->onRestore(); - ui->colorButton_5->onRestore(); - ui->colorButton_6->onRestore(); + ui->backgroundColorButton->onRestore(); + ui->backgroundTextColorButton->onRestore(); + ui->pageBackgroundColorButton->onRestore(); + ui->pageTextColorButton->onRestore(); + ui->boxBackgroundColorButton->onRestore(); + ui->linkColorButton->onRestore(); ui->colorButton_7->onRestore(); - ui->fileChooser_2->onRestore(); - ui->fileChooser_3->onRestore(); + ui->backgroundImageFileChooser->onRestore(); + ui->showAdditionalFolderFileChooser->onRestore(); ui->radioButton_1->onRestore(); ui->radioButton_2->onRestore(); - ui->checkBox->onRestore(); - ui->checkBox_1->onRestore(); - ui->checkBox_2->onRestore(); - ui->checkBox_3->onRestore(); - ui->checkBox_4->onRestore(); - ui->checkBox_5->onRestore(); - ui->checkBox_6->onRestore(); - ui->checkBox_7->onRestore(); - ui->lineEdit->onRestore(); - ui->spinBox->onRestore(); + ui->showNotepadCheckBox->onRestore(); + ui->showExamplesCheckBox->onRestore(); + ui->closeStartCheckBox->onRestore(); + ui->closeAndSwitchCheckBox->onRestore(); + ui->showForumCheckBox->onRestore(); + ui->useStyleSheetCheckBox->onRestore(); + ui->showTipsCheckBox->onRestore(); + ui->showScrollbarsCheckBox->onRestore(); + ui->fontLineEdit->onRestore(); + ui->fontSizeSpinBox->onRestore(); ui->showFileThumbnailIconsCheckBox->onRestore(); ui->fileThumbnailIconSizeSpinBox->onRestore(); }