From 590cce8a7719b969c6be90192f1a8036f3bfd9d2 Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Fri, 22 Jan 2021 13:49:10 -0800 Subject: [PATCH] Removed Stud Style checkbox and renamed options to match LDraw. --- qt/lc_qpreferencesdialog.cpp | 21 +------- qt/lc_qpreferencesdialog.h | 1 - qt/lc_qpreferencesdialog.ui | 100 ++++++++++++++++++----------------- 3 files changed, 54 insertions(+), 68 deletions(-) diff --git a/qt/lc_qpreferencesdialog.cpp b/qt/lc_qpreferencesdialog.cpp index 2fb7789d..c49a00d2 100644 --- a/qt/lc_qpreferencesdialog.cpp +++ b/qt/lc_qpreferencesdialog.cpp @@ -162,16 +162,9 @@ lcQPreferencesDialog::lcQPreferencesDialog(QWidget* Parent, lcPreferencesDialogO ui->PreviewViewSphereSizeCombo->setCurrentIndex(0); if (!lcGetPiecesLibrary()->SupportsStudStyle()) - { - ui->studStyle->setEnabled(false); ui->studStyleCombo->setEnabled(false); - } - ui->studStyle->setChecked(mOptions->StudStyle); - if (ui->studStyle->isChecked()) - ui->studStyleCombo->setCurrentIndex(mOptions->StudStyle - 1); - else - ui->studStyleCombo->setCurrentIndex(mOptions->StudStyle); + ui->studStyleCombo->setCurrentIndex(mOptions->StudStyle); if (!gSupportsShaderObjects) ui->ShadingMode->removeItem(static_cast(lcShadingMode::DefaultLights)); @@ -203,7 +196,6 @@ lcQPreferencesDialog::lcQPreferencesDialog(QWidget* Parent, lcPreferencesDialogO SetButtonPixmap(mOptions->Preferences.mViewSphereTextColor, ui->ViewSphereTextColorButton); SetButtonPixmap(mOptions->Preferences.mViewSphereHighlightColor, ui->ViewSphereHighlightColorButton); - on_studStyle_toggled(); on_antiAliasing_toggled(); on_edgeLines_toggled(); on_LineWidthSlider_valueChanged(); @@ -303,10 +295,7 @@ void lcQPreferencesDialog::accept() mOptions->Preferences.mShadingMode = (lcShadingMode)ui->ShadingMode->currentIndex(); - if (ui->studStyleCombo->isEnabled()) - mOptions->StudStyle = ui->studStyleCombo->currentIndex() + 1; - else - mOptions->StudStyle = 0; + mOptions->StudStyle = ui->studStyleCombo->currentIndex(); mOptions->Preferences.mDrawPreviewAxis = ui->PreviewAxisIconCheckBox->isChecked(); mOptions->Preferences.mPreviewViewSphereEnabled = ui->PreviewViewSphereSizeCombo->currentIndex() > 0; @@ -504,12 +493,6 @@ void lcQPreferencesDialog::ColorButtonClicked() ((QToolButton*)Button)->setIcon(pix); } -void lcQPreferencesDialog::on_studStyle_toggled() -{ - if (lcGetPiecesLibrary()->SupportsStudStyle()) - ui->studStyleCombo->setEnabled(ui->studStyle->isChecked()); -} - void lcQPreferencesDialog::on_antiAliasing_toggled() { ui->antiAliasingSamples->setEnabled(ui->antiAliasing->isChecked()); diff --git a/qt/lc_qpreferencesdialog.h b/qt/lc_qpreferencesdialog.h index 4bea7b1f..6929cadb 100644 --- a/qt/lc_qpreferencesdialog.h +++ b/qt/lc_qpreferencesdialog.h @@ -94,7 +94,6 @@ public slots: void on_MouseImportButton_clicked(); void on_MouseExportButton_clicked(); void on_mouseReset_clicked(); - void on_studStyle_toggled(); void MouseTreeItemChanged(QTreeWidgetItem* Current); private: diff --git a/qt/lc_qpreferencesdialog.ui b/qt/lc_qpreferencesdialog.ui index 36ae0204..fb454684 100644 --- a/qt/lc_qpreferencesdialog.ui +++ b/qt/lc_qpreferencesdialog.ui @@ -386,52 +386,6 @@ - - - - - 1 LDraw Single Wire - - - - - 2 LDraw Double Wire - - - - - 3 LDraw Raised Floating - - - - - 4 LDraw Raised Rounded - - - - - 5 LDraw Subtle Rounded - - - - - 6 LEGO Without Logo - - - - - 7 LEGO Single Wire - - - - - - - - Stud Style - - - @@ -532,6 +486,57 @@ + + + + + Plain + + + + + Thin Lines Logo + + + + + Outline Logo + + + + + Sharp Top Logo + + + + + Rounded Top Logo + + + + + Flattened Logo + + + + + High Contrast + + + + + High Contrast with Logo + + + + + + + + Stud Style + + + @@ -1703,8 +1708,6 @@ RestoreTabLayout antiAliasing antiAliasingSamples - studStyle - studStyleCombo edgeLines LineWidthSlider MeshLOD @@ -1713,6 +1716,7 @@ FadeStepsColor HighlightNewParts HighlightNewPartsColor + studStyleCombo ShadingMode ViewSphereSizeCombo ViewSphereLocationCombo