mirror of
https://github.com/leozide/leocad
synced 2025-02-07 08:45:49 +01:00
More intuitive edge colour naming
This commit is contained in:
parent
6fe393d147
commit
2801558458
8 changed files with 83 additions and 93 deletions
|
@ -58,8 +58,8 @@ void lcPreferences::LoadDefaults()
|
||||||
mPreviewViewSphereSize = lcGetProfileInt(LC_PROFILE_PREVIEW_VIEW_SPHERE_SIZE);
|
mPreviewViewSphereSize = lcGetProfileInt(LC_PROFILE_PREVIEW_VIEW_SPHERE_SIZE);
|
||||||
mPreviewViewSphereLocation = static_cast<lcViewSphereLocation>(lcGetProfileInt(LC_PROFILE_PREVIEW_VIEW_SPHERE_LOCATION));
|
mPreviewViewSphereLocation = static_cast<lcViewSphereLocation>(lcGetProfileInt(LC_PROFILE_PREVIEW_VIEW_SPHERE_LOCATION));
|
||||||
mDrawPreviewAxis = lcGetProfileInt(LC_PROFILE_PREVIEW_DRAW_AXES);
|
mDrawPreviewAxis = lcGetProfileInt(LC_PROFILE_PREVIEW_DRAW_AXES);
|
||||||
mStudColor = lcGetProfileInt(LC_PROFILE_STUD_COLOR);
|
mStudCylinderColor = lcGetProfileInt(LC_PROFILE_STUD_CYLINDER_COLOR);
|
||||||
mStudEdgeColor = lcGetProfileInt(LC_PROFILE_STUD_EDGE_COLOR);
|
mPartEdgeColor = lcGetProfileInt(LC_PROFILE_PART_EDGE_COLOR);
|
||||||
mBlackEdgeColor = lcGetProfileInt(LC_PROFILE_BLACK_EDGE_COLOR);
|
mBlackEdgeColor = lcGetProfileInt(LC_PROFILE_BLACK_EDGE_COLOR);
|
||||||
mDarkEdgeColor = lcGetProfileInt(LC_PROFILE_DARK_EDGE_COLOR);
|
mDarkEdgeColor = lcGetProfileInt(LC_PROFILE_DARK_EDGE_COLOR);
|
||||||
mPartEdgeContrast = lcGetProfileFloat(LC_PROFILE_PART_EDGE_CONTRAST);
|
mPartEdgeContrast = lcGetProfileFloat(LC_PROFILE_PART_EDGE_CONTRAST);
|
||||||
|
@ -110,8 +110,8 @@ void lcPreferences::SaveDefaults()
|
||||||
lcSetProfileInt(LC_PROFILE_PREVIEW_VIEW_SPHERE_SIZE, mPreviewViewSphereSize);
|
lcSetProfileInt(LC_PROFILE_PREVIEW_VIEW_SPHERE_SIZE, mPreviewViewSphereSize);
|
||||||
lcSetProfileInt(LC_PROFILE_PREVIEW_VIEW_SPHERE_LOCATION, static_cast<int>(mPreviewViewSphereLocation));
|
lcSetProfileInt(LC_PROFILE_PREVIEW_VIEW_SPHERE_LOCATION, static_cast<int>(mPreviewViewSphereLocation));
|
||||||
lcSetProfileInt(LC_PROFILE_PREVIEW_DRAW_AXES, mDrawPreviewAxis);
|
lcSetProfileInt(LC_PROFILE_PREVIEW_DRAW_AXES, mDrawPreviewAxis);
|
||||||
lcSetProfileInt(LC_PROFILE_STUD_COLOR, mStudColor);
|
lcSetProfileInt(LC_PROFILE_STUD_CYLINDER_COLOR, mStudCylinderColor);
|
||||||
lcSetProfileInt(LC_PROFILE_STUD_EDGE_COLOR, mStudEdgeColor);
|
lcSetProfileInt(LC_PROFILE_PART_EDGE_COLOR, mPartEdgeColor);
|
||||||
lcSetProfileInt(LC_PROFILE_BLACK_EDGE_COLOR, mBlackEdgeColor);
|
lcSetProfileInt(LC_PROFILE_BLACK_EDGE_COLOR, mBlackEdgeColor);
|
||||||
lcSetProfileInt(LC_PROFILE_DARK_EDGE_COLOR, mDarkEdgeColor);
|
lcSetProfileInt(LC_PROFILE_DARK_EDGE_COLOR, mDarkEdgeColor);
|
||||||
lcSetProfileFloat(LC_PROFILE_PART_EDGE_CONTRAST, mPartEdgeContrast);
|
lcSetProfileFloat(LC_PROFILE_PART_EDGE_CONTRAST, mPartEdgeContrast);
|
||||||
|
@ -1161,8 +1161,8 @@ void lcApplication::ShowPreferencesDialog()
|
||||||
bool AAChanged = CurrentAASamples != Options.AASamples;
|
bool AAChanged = CurrentAASamples != Options.AASamples;
|
||||||
bool StudStyleChanged = CurrentStudStyle != Options.StudStyle;
|
bool StudStyleChanged = CurrentStudStyle != Options.StudStyle;
|
||||||
bool AutomateEdgeColorChanged = Options.Preferences.mAutomateEdgeColor != mPreferences.mAutomateEdgeColor;
|
bool AutomateEdgeColorChanged = Options.Preferences.mAutomateEdgeColor != mPreferences.mAutomateEdgeColor;
|
||||||
AutomateEdgeColorChanged |= Options.Preferences.mStudColor != mPreferences.mStudColor;
|
AutomateEdgeColorChanged |= Options.Preferences.mStudCylinderColor != mPreferences.mStudCylinderColor;
|
||||||
AutomateEdgeColorChanged |= Options.Preferences.mStudEdgeColor != mPreferences.mStudEdgeColor;
|
AutomateEdgeColorChanged |= Options.Preferences.mPartEdgeColor != mPreferences.mPartEdgeColor;
|
||||||
AutomateEdgeColorChanged |= Options.Preferences.mBlackEdgeColor != mPreferences.mBlackEdgeColor;
|
AutomateEdgeColorChanged |= Options.Preferences.mBlackEdgeColor != mPreferences.mBlackEdgeColor;
|
||||||
AutomateEdgeColorChanged |= Options.Preferences.mDarkEdgeColor != mPreferences.mDarkEdgeColor;
|
AutomateEdgeColorChanged |= Options.Preferences.mDarkEdgeColor != mPreferences.mDarkEdgeColor;
|
||||||
AutomateEdgeColorChanged |= Options.Preferences.mPartEdgeContrast != mPreferences.mPartEdgeContrast;
|
AutomateEdgeColorChanged |= Options.Preferences.mPartEdgeContrast != mPreferences.mPartEdgeContrast;
|
||||||
|
|
|
@ -73,8 +73,8 @@ public:
|
||||||
lcViewSphereLocation mPreviewViewSphereLocation;
|
lcViewSphereLocation mPreviewViewSphereLocation;
|
||||||
int mDrawPreviewAxis;
|
int mDrawPreviewAxis;
|
||||||
|
|
||||||
quint32 mStudColor;
|
quint32 mStudCylinderColor;
|
||||||
quint32 mStudEdgeColor;
|
quint32 mPartEdgeColor;
|
||||||
quint32 mBlackEdgeColor;
|
quint32 mBlackEdgeColor;
|
||||||
quint32 mDarkEdgeColor;
|
quint32 mDarkEdgeColor;
|
||||||
float mPartEdgeContrast;
|
float mPartEdgeContrast;
|
||||||
|
|
|
@ -245,7 +245,7 @@ static void lcAdjustStudStyleColors(std::vector<lcColor>& Colors, lcStudStyle St
|
||||||
if (StudStyle != lcStudStyle::HighContrast && StudStyle != lcStudStyle::HighContrastLogo)
|
if (StudStyle != lcStudStyle::HighContrast && StudStyle != lcStudStyle::HighContrastLogo)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const lcVector4 Edge = lcVector4FromColor(Preferences.mStudEdgeColor);
|
const lcVector4 Edge = lcVector4FromColor(Preferences.mPartEdgeColor);
|
||||||
const lcVector4 DarkEdge = lcVector4FromColor(Preferences.mDarkEdgeColor);
|
const lcVector4 DarkEdge = lcVector4FromColor(Preferences.mDarkEdgeColor);
|
||||||
const lcVector4 BlackEdge = lcVector4FromColor(Preferences.mBlackEdgeColor);
|
const lcVector4 BlackEdge = lcVector4FromColor(Preferences.mBlackEdgeColor);
|
||||||
|
|
||||||
|
@ -468,17 +468,17 @@ bool lcLoadColorFile(lcFile& File, lcStudStyle StudStyle)
|
||||||
if (!FoundStud)
|
if (!FoundStud)
|
||||||
{
|
{
|
||||||
const lcPreferences& Preferences = lcGetPreferences();
|
const lcPreferences& Preferences = lcGetPreferences();
|
||||||
lcColor StudColor;
|
lcColor StudCylinderColor;
|
||||||
|
|
||||||
StudColor.Code = 4242;
|
StudCylinderColor.Code = 4242;
|
||||||
StudColor.Translucent = false;
|
StudCylinderColor.Translucent = false;
|
||||||
StudColor.Group = LC_NUM_COLORGROUPS;
|
StudCylinderColor.Group = LC_NUM_COLORGROUPS;
|
||||||
StudColor.Value = lcVector4FromColor(Preferences.mStudColor);
|
StudCylinderColor.Value = lcVector4FromColor(Preferences.mStudCylinderColor);
|
||||||
StudColor.Edge = lcVector4FromColor(Preferences.mStudEdgeColor);
|
StudCylinderColor.Edge = lcVector4FromColor(Preferences.mPartEdgeColor);
|
||||||
strcpy(StudColor.Name, "Stud Style Black");
|
strcpy(StudCylinderColor.Name, "Stud Cylinder Color");
|
||||||
strcpy(StudColor.SafeName, "Stud_Style_Black");
|
strcpy(StudCylinderColor.SafeName, "Stud_Cylinder_Color");
|
||||||
|
|
||||||
Colors.push_back(StudColor);
|
Colors.push_back(StudCylinderColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (lcColor& Color : gColorList)
|
for (lcColor& Color : gColorList)
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
lcAutomateEdgeColorDialog::lcAutomateEdgeColorDialog(QWidget* Parent, bool ShowHighContrastDialog)
|
lcAutomateEdgeColorDialog::lcAutomateEdgeColorDialog(QWidget* Parent, bool ShowHighContrastDialog)
|
||||||
:QDialog(Parent)
|
:QDialog(Parent)
|
||||||
{
|
{
|
||||||
mStudColor = lcGetPreferences().mStudColor;
|
mStudCylinderColor = lcGetPreferences().mStudCylinderColor;
|
||||||
mStudEdgeColor = lcGetPreferences().mStudEdgeColor;
|
mPartEdgeColor = lcGetPreferences().mPartEdgeColor;
|
||||||
mBlackEdgeColor = lcGetPreferences().mBlackEdgeColor;
|
mBlackEdgeColor = lcGetPreferences().mBlackEdgeColor;
|
||||||
mDarkEdgeColor = lcGetPreferences().mDarkEdgeColor;
|
mDarkEdgeColor = lcGetPreferences().mDarkEdgeColor;
|
||||||
|
|
||||||
|
@ -31,8 +31,7 @@ lcAutomateEdgeColorDialog::lcAutomateEdgeColorDialog(QWidget* Parent, bool ShowH
|
||||||
emit PartEdgeContrastSlider->valueChanged(PartEdgeContrastSlider->value());
|
emit PartEdgeContrastSlider->valueChanged(PartEdgeContrastSlider->value());
|
||||||
|
|
||||||
ResetPartEdgeContrastButton = new QToolButton(this);
|
ResetPartEdgeContrastButton = new QToolButton(this);
|
||||||
ResetPartEdgeContrastButton->setText(tr("..."));
|
ResetPartEdgeContrastButton->setText(tr("Reset"));
|
||||||
ResetPartEdgeContrastButton->setToolTip(tr("Reset"));
|
|
||||||
connect(ResetPartEdgeContrastButton, SIGNAL(clicked()), this, SLOT(ResetSliderButtonClicked()));
|
connect(ResetPartEdgeContrastButton, SIGNAL(clicked()), this, SLOT(ResetSliderButtonClicked()));
|
||||||
|
|
||||||
EdgeSettingsLayout->addWidget(PartEdgeContrastLabel,0,0);
|
EdgeSettingsLayout->addWidget(PartEdgeContrastLabel,0,0);
|
||||||
|
@ -50,8 +49,7 @@ lcAutomateEdgeColorDialog::lcAutomateEdgeColorDialog(QWidget* Parent, bool ShowH
|
||||||
emit PartColorValueLDIndexSlider->valueChanged(PartColorValueLDIndexSlider->value());
|
emit PartColorValueLDIndexSlider->valueChanged(PartColorValueLDIndexSlider->value());
|
||||||
|
|
||||||
ResetPartColorValueLDIndexButton = new QToolButton(this);
|
ResetPartColorValueLDIndexButton = new QToolButton(this);
|
||||||
ResetPartColorValueLDIndexButton->setText(tr("..."));
|
ResetPartColorValueLDIndexButton->setText(tr("Reset"));
|
||||||
ResetPartColorValueLDIndexButton->setToolTip(tr("Reset"));
|
|
||||||
connect(ResetPartColorValueLDIndexButton, SIGNAL(clicked()), this, SLOT(ResetSliderButtonClicked()));
|
connect(ResetPartColorValueLDIndexButton, SIGNAL(clicked()), this, SLOT(ResetSliderButtonClicked()));
|
||||||
|
|
||||||
EdgeSettingsLayout->addWidget(PartColorValueLDIndexLabel,1,0);
|
EdgeSettingsLayout->addWidget(PartColorValueLDIndexLabel,1,0);
|
||||||
|
@ -59,11 +57,11 @@ lcAutomateEdgeColorDialog::lcAutomateEdgeColorDialog(QWidget* Parent, bool ShowH
|
||||||
EdgeSettingsLayout->addWidget(PartColorValueLDIndex,1,2);
|
EdgeSettingsLayout->addWidget(PartColorValueLDIndex,1,2);
|
||||||
EdgeSettingsLayout->addWidget(ResetPartColorValueLDIndexButton,1,3);
|
EdgeSettingsLayout->addWidget(ResetPartColorValueLDIndexButton,1,3);
|
||||||
|
|
||||||
QGroupBox* StudColorBox = new QGroupBox(tr("High Contrast Studs"), this);
|
QGroupBox* HighContrastColorBox = new QGroupBox(tr("High Contrast"), this);
|
||||||
StudColorBox->setVisible(ShowHighContrastDialog);
|
HighContrastColorBox->setVisible(ShowHighContrastDialog);
|
||||||
MainLayout->addWidget(StudColorBox);
|
MainLayout->addWidget(HighContrastColorBox);
|
||||||
QGridLayout* StudColorLayout = new QGridLayout(StudColorBox);
|
QGridLayout* HighContrastColorLayout = new QGridLayout(HighContrastColorBox);
|
||||||
StudColorBox->setLayout(StudColorLayout);
|
HighContrastColorBox->setLayout(HighContrastColorLayout);
|
||||||
|
|
||||||
auto SetButtonPixmap = [](quint32 Color, QToolButton* Button)
|
auto SetButtonPixmap = [](quint32 Color, QToolButton* Button)
|
||||||
{
|
{
|
||||||
|
@ -74,33 +72,31 @@ lcAutomateEdgeColorDialog::lcAutomateEdgeColorDialog(QWidget* Parent, bool ShowH
|
||||||
Button->setToolTip(ButtonColor.name().toUpper());
|
Button->setToolTip(ButtonColor.name().toUpper());
|
||||||
};
|
};
|
||||||
|
|
||||||
QLabel* StudColorLabel = new QLabel(tr("Stud Color:"), this);
|
QLabel* StudCylinderColorLabel = new QLabel(tr("Stud Cylinder Color:"), this);
|
||||||
StudColorButton = new QToolButton(this);
|
StudCylinderColorButton = new QToolButton(this);
|
||||||
SetButtonPixmap(mStudColor, StudColorButton);
|
SetButtonPixmap(mStudCylinderColor, StudCylinderColorButton);
|
||||||
connect(StudColorButton, SIGNAL(clicked()), this, SLOT(ColorButtonClicked()));
|
connect(StudCylinderColorButton, SIGNAL(clicked()), this, SLOT(ColorButtonClicked()));
|
||||||
|
|
||||||
ResetStudColorButton = new QToolButton(this);
|
ResetStudCylinderColorButton = new QToolButton(this);
|
||||||
ResetStudColorButton->setText(tr("..."));
|
ResetStudCylinderColorButton->setText(tr("Reset"));;
|
||||||
ResetStudColorButton->setToolTip(tr("Reset"));
|
connect(ResetStudCylinderColorButton, SIGNAL(clicked()), this, SLOT(ResetColorButtonClicked()));
|
||||||
connect(ResetStudColorButton, SIGNAL(clicked()), this, SLOT(ResetColorButtonClicked()));
|
|
||||||
|
|
||||||
StudColorLayout->addWidget(StudColorLabel,0,0);
|
HighContrastColorLayout->addWidget(StudCylinderColorLabel,0,0);
|
||||||
StudColorLayout->addWidget(StudColorButton,0,1);
|
HighContrastColorLayout->addWidget(StudCylinderColorButton,0,1);
|
||||||
StudColorLayout->addWidget(ResetStudColorButton,0,2);
|
HighContrastColorLayout->addWidget(ResetStudCylinderColorButton,0,2);
|
||||||
|
|
||||||
QLabel* StudEdgeColorLabel = new QLabel(tr("Stud Edge Color:"), this);
|
QLabel* PartEdgeColorLabel = new QLabel(tr("Parts Edge Color:"), this);
|
||||||
StudEdgeColorButton = new QToolButton(this);
|
PartEdgeColorButton = new QToolButton(this);
|
||||||
SetButtonPixmap(mStudEdgeColor, StudEdgeColorButton);
|
SetButtonPixmap(mPartEdgeColor, PartEdgeColorButton);
|
||||||
connect(StudEdgeColorButton, SIGNAL(clicked()), this, SLOT(ColorButtonClicked()));
|
connect(PartEdgeColorButton, SIGNAL(clicked()), this, SLOT(ColorButtonClicked()));
|
||||||
|
|
||||||
ResetStudEdgeColorButton = new QToolButton(this);
|
ResetPartEdgeColorButton = new QToolButton(this);
|
||||||
ResetStudEdgeColorButton->setText(tr("..."));
|
ResetPartEdgeColorButton->setText(tr("Reset"));
|
||||||
ResetStudEdgeColorButton->setToolTip(tr("Reset"));
|
connect(ResetPartEdgeColorButton, SIGNAL(clicked()), this, SLOT(ResetColorButtonClicked()));
|
||||||
connect(ResetStudEdgeColorButton, SIGNAL(clicked()), this, SLOT(ResetColorButtonClicked()));
|
|
||||||
|
|
||||||
StudColorLayout->addWidget(StudEdgeColorLabel,1,0);
|
HighContrastColorLayout->addWidget(PartEdgeColorLabel,1,0);
|
||||||
StudColorLayout->addWidget(StudEdgeColorButton,1,1);
|
HighContrastColorLayout->addWidget(PartEdgeColorButton,1,1);
|
||||||
StudColorLayout->addWidget(ResetStudEdgeColorButton,1,2);
|
HighContrastColorLayout->addWidget(ResetPartEdgeColorButton,1,2);
|
||||||
|
|
||||||
QLabel* BlackEdgeColorLabel = new QLabel(tr("Black Parts Edge Color:"), this);
|
QLabel* BlackEdgeColorLabel = new QLabel(tr("Black Parts Edge Color:"), this);
|
||||||
BlackEdgeColorButton = new QToolButton(this);
|
BlackEdgeColorButton = new QToolButton(this);
|
||||||
|
@ -108,13 +104,12 @@ lcAutomateEdgeColorDialog::lcAutomateEdgeColorDialog(QWidget* Parent, bool ShowH
|
||||||
connect(BlackEdgeColorButton, SIGNAL(clicked()), this, SLOT(ColorButtonClicked()));
|
connect(BlackEdgeColorButton, SIGNAL(clicked()), this, SLOT(ColorButtonClicked()));
|
||||||
|
|
||||||
ResetBlackEdgeColorButton = new QToolButton(this);
|
ResetBlackEdgeColorButton = new QToolButton(this);
|
||||||
ResetBlackEdgeColorButton->setText(tr("..."));
|
ResetBlackEdgeColorButton->setText(tr("Reset"));
|
||||||
ResetBlackEdgeColorButton->setToolTip(tr("Reset"));
|
|
||||||
connect(ResetBlackEdgeColorButton, SIGNAL(clicked()), this, SLOT(ResetColorButtonClicked()));
|
connect(ResetBlackEdgeColorButton, SIGNAL(clicked()), this, SLOT(ResetColorButtonClicked()));
|
||||||
|
|
||||||
StudColorLayout->addWidget(BlackEdgeColorLabel,2,0);
|
HighContrastColorLayout->addWidget(BlackEdgeColorLabel,2,0);
|
||||||
StudColorLayout->addWidget(BlackEdgeColorButton,2,1);
|
HighContrastColorLayout->addWidget(BlackEdgeColorButton,2,1);
|
||||||
StudColorLayout->addWidget(ResetBlackEdgeColorButton,2,2);
|
HighContrastColorLayout->addWidget(ResetBlackEdgeColorButton,2,2);
|
||||||
|
|
||||||
QLabel* DarkEdgeColorLabel = new QLabel(tr("Dark Parts Edge Color:"), this);
|
QLabel* DarkEdgeColorLabel = new QLabel(tr("Dark Parts Edge Color:"), this);
|
||||||
DarkEdgeColorButton = new QToolButton(this);
|
DarkEdgeColorButton = new QToolButton(this);
|
||||||
|
@ -122,13 +117,12 @@ lcAutomateEdgeColorDialog::lcAutomateEdgeColorDialog(QWidget* Parent, bool ShowH
|
||||||
connect(DarkEdgeColorButton, SIGNAL(clicked()), this, SLOT(ColorButtonClicked()));
|
connect(DarkEdgeColorButton, SIGNAL(clicked()), this, SLOT(ColorButtonClicked()));
|
||||||
|
|
||||||
ResetDarkEdgeColorButton = new QToolButton(this);
|
ResetDarkEdgeColorButton = new QToolButton(this);
|
||||||
ResetDarkEdgeColorButton->setText(tr("..."));
|
ResetDarkEdgeColorButton->setText(tr("Reset"));
|
||||||
ResetDarkEdgeColorButton->setToolTip(tr("Reset"));
|
|
||||||
connect(ResetDarkEdgeColorButton, SIGNAL(clicked()), this, SLOT(ResetColorButtonClicked()));
|
connect(ResetDarkEdgeColorButton, SIGNAL(clicked()), this, SLOT(ResetColorButtonClicked()));
|
||||||
|
|
||||||
StudColorLayout->addWidget(DarkEdgeColorLabel,3,0);
|
HighContrastColorLayout->addWidget(DarkEdgeColorLabel,3,0);
|
||||||
StudColorLayout->addWidget(DarkEdgeColorButton,3,1);
|
HighContrastColorLayout->addWidget(DarkEdgeColorButton,3,1);
|
||||||
StudColorLayout->addWidget(ResetDarkEdgeColorButton,3,2);
|
HighContrastColorLayout->addWidget(ResetDarkEdgeColorButton,3,2);
|
||||||
|
|
||||||
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
|
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
|
||||||
MainLayout->addWidget(buttonBox);
|
MainLayout->addWidget(buttonBox);
|
||||||
|
@ -159,23 +153,22 @@ void lcAutomateEdgeColorDialog::ColorButtonClicked()
|
||||||
quint32* Color = nullptr;
|
quint32* Color = nullptr;
|
||||||
QColorDialog::ColorDialogOptions DialogOptions;
|
QColorDialog::ColorDialogOptions DialogOptions;
|
||||||
|
|
||||||
if (Button == StudColorButton)
|
if (Button == StudCylinderColorButton)
|
||||||
{
|
{
|
||||||
Title = tr("Select Stud Color");
|
Title = tr("Select Stud Cylinder Color");
|
||||||
Color = &mStudColor;
|
Color = &mStudCylinderColor;
|
||||||
}
|
}
|
||||||
else if (Button == StudEdgeColorButton)
|
else if (Button == PartEdgeColorButton)
|
||||||
{
|
{
|
||||||
Title = tr("Select Stud Edge Color");
|
Title = tr("Select Part Edge Color");
|
||||||
Color = &mStudEdgeColor;
|
Color = &mPartEdgeColor;
|
||||||
}
|
}
|
||||||
else if (Button == BlackEdgeColorButton)
|
else if (Button == BlackEdgeColorButton)
|
||||||
{
|
{
|
||||||
if (lcGetPreferences().mAutomateEdgeColor)
|
if (lcGetPreferences().mAutomateEdgeColor)
|
||||||
{
|
{
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setText("Automate edge colour appears to be enabled.<br>"
|
msgBox.setText("Automate edge color appears to be enabled.<br>Black parts edge color will not be accessible.<br>Do you want to continue ?");
|
||||||
"Black parts edge color setting will not be accessible.");
|
|
||||||
if (msgBox.exec() != QMessageBox::Accepted)
|
if (msgBox.exec() != QMessageBox::Accepted)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -187,8 +180,7 @@ void lcAutomateEdgeColorDialog::ColorButtonClicked()
|
||||||
if (lcGetPreferences().mAutomateEdgeColor)
|
if (lcGetPreferences().mAutomateEdgeColor)
|
||||||
{
|
{
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setText("Automate edge colour appears to be enabled.<br>"
|
msgBox.setText("Automate edge color appears to be enabled.<br>Dark parts edge color will not be accessible.<br>Do you want to continue ?");
|
||||||
"Dark parts edge color setting will not be accessible.");
|
|
||||||
if (msgBox.exec() != QMessageBox::Accepted)
|
if (msgBox.exec() != QMessageBox::Accepted)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -218,12 +210,10 @@ void lcAutomateEdgeColorDialog::ResetSliderButtonClicked()
|
||||||
if (sender() == ResetPartEdgeContrastButton)
|
if (sender() == ResetPartEdgeContrastButton)
|
||||||
{
|
{
|
||||||
PartEdgeContrastSlider->setValue(0.5f * 100);
|
PartEdgeContrastSlider->setValue(0.5f * 100);
|
||||||
emit PartEdgeContrastSlider->valueChanged(PartEdgeContrastSlider->value());
|
|
||||||
}
|
}
|
||||||
else if (sender() == ResetPartColorValueLDIndexButton)
|
else if (sender() == ResetPartColorValueLDIndexButton)
|
||||||
{
|
{
|
||||||
PartColorValueLDIndexSlider->setValue(0.5f * 100);
|
PartColorValueLDIndexSlider->setValue(0.5f * 100);
|
||||||
emit PartColorValueLDIndexSlider->valueChanged(PartColorValueLDIndexSlider->value());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,23 +223,23 @@ void lcAutomateEdgeColorDialog::ResetColorButtonClicked()
|
||||||
QPixmap Pix(12, 12);
|
QPixmap Pix(12, 12);
|
||||||
QColor ResetColor;
|
QColor ResetColor;
|
||||||
|
|
||||||
if (sender() == ResetStudColorButton)
|
if (sender() == ResetStudCylinderColorButton)
|
||||||
{
|
{
|
||||||
Color = &mStudColor;
|
Color = &mStudCylinderColor;
|
||||||
*Color = LC_RGBA(27, 42, 52, 255);
|
*Color = LC_RGBA(27, 42, 52, 255);
|
||||||
ResetColor = QColor(LC_RGBA_RED(*Color), LC_RGBA_GREEN(*Color), LC_RGBA_BLUE(*Color), LC_RGBA_ALPHA(*Color));
|
ResetColor = QColor(LC_RGBA_RED(*Color), LC_RGBA_GREEN(*Color), LC_RGBA_BLUE(*Color), LC_RGBA_ALPHA(*Color));
|
||||||
Pix.fill(ResetColor);
|
Pix.fill(ResetColor);
|
||||||
StudColorButton->setIcon(Pix);
|
StudCylinderColorButton->setIcon(Pix);
|
||||||
StudColorButton->setToolTip(ResetColor.name().toUpper());
|
StudCylinderColorButton->setToolTip(ResetColor.name().toUpper());
|
||||||
}
|
}
|
||||||
else if (sender() == ResetStudEdgeColorButton)
|
else if (sender() == ResetPartEdgeColorButton)
|
||||||
{
|
{
|
||||||
Color = &mStudEdgeColor;
|
Color = &mPartEdgeColor;
|
||||||
*Color = LC_RGBA(0, 0, 0, 255);
|
*Color = LC_RGBA(0, 0, 0, 255);
|
||||||
ResetColor = QColor(LC_RGBA_RED(*Color), LC_RGBA_GREEN(*Color), LC_RGBA_BLUE(*Color), LC_RGBA_ALPHA(*Color));
|
ResetColor = QColor(LC_RGBA_RED(*Color), LC_RGBA_GREEN(*Color), LC_RGBA_BLUE(*Color), LC_RGBA_ALPHA(*Color));
|
||||||
Pix.fill(ResetColor);
|
Pix.fill(ResetColor);
|
||||||
StudEdgeColorButton->setIcon(Pix);
|
PartEdgeColorButton->setIcon(Pix);
|
||||||
StudEdgeColorButton->setToolTip(ResetColor.name().toUpper());
|
PartEdgeColorButton->setToolTip(ResetColor.name().toUpper());
|
||||||
}
|
}
|
||||||
else if (sender() == ResetBlackEdgeColorButton)
|
else if (sender() == ResetBlackEdgeColorButton)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,8 +7,8 @@ class lcAutomateEdgeColorDialog : public QDialog
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
lcAutomateEdgeColorDialog(QWidget *Parent, bool ShowHighContrastDialog);
|
lcAutomateEdgeColorDialog(QWidget *Parent, bool ShowHighContrastDialog);
|
||||||
quint32 mStudColor;
|
quint32 mStudCylinderColor;
|
||||||
quint32 mStudEdgeColor;
|
quint32 mPartEdgeColor;
|
||||||
quint32 mDarkEdgeColor;
|
quint32 mDarkEdgeColor;
|
||||||
quint32 mBlackEdgeColor;
|
quint32 mBlackEdgeColor;
|
||||||
float mPartEdgeContrast;
|
float mPartEdgeContrast;
|
||||||
|
@ -30,13 +30,13 @@ protected:
|
||||||
QToolButton* ResetPartEdgeContrastButton;
|
QToolButton* ResetPartEdgeContrastButton;
|
||||||
QToolButton* ResetPartColorValueLDIndexButton;
|
QToolButton* ResetPartColorValueLDIndexButton;
|
||||||
|
|
||||||
QToolButton* StudColorButton;
|
QToolButton* StudCylinderColorButton;
|
||||||
QToolButton* StudEdgeColorButton;
|
QToolButton* PartEdgeColorButton;
|
||||||
QToolButton* BlackEdgeColorButton;
|
QToolButton* BlackEdgeColorButton;
|
||||||
QToolButton* DarkEdgeColorButton;
|
QToolButton* DarkEdgeColorButton;
|
||||||
|
|
||||||
QToolButton* ResetStudColorButton;
|
QToolButton* ResetStudCylinderColorButton;
|
||||||
QToolButton* ResetStudEdgeColorButton;
|
QToolButton* ResetPartEdgeColorButton;
|
||||||
QToolButton* ResetBlackEdgeColorButton;
|
QToolButton* ResetBlackEdgeColorButton;
|
||||||
QToolButton* ResetDarkEdgeColorButton;
|
QToolButton* ResetDarkEdgeColorButton;
|
||||||
};
|
};
|
||||||
|
|
|
@ -140,8 +140,8 @@ static lcProfileEntry gProfileEntries[LC_NUM_PROFILE_KEYS] =
|
||||||
lcProfileEntry("Settings", "PreviewViewSphereLocation", (int)lcViewSphereLocation::TopRight), // LC_PROFILE_PREVIEW_VIEW_SPHERE_LOCATION
|
lcProfileEntry("Settings", "PreviewViewSphereLocation", (int)lcViewSphereLocation::TopRight), // LC_PROFILE_PREVIEW_VIEW_SPHERE_LOCATION
|
||||||
lcProfileEntry("Settings", "DrawPreviewAxis", 0), // LC_PROFILE_PREVIEW_DRAW_AXES
|
lcProfileEntry("Settings", "DrawPreviewAxis", 0), // LC_PROFILE_PREVIEW_DRAW_AXES
|
||||||
|
|
||||||
lcProfileEntry("Settings", "StudColor", LC_RGBA(27, 42, 52, 255)), // LC_PROFILE_STUD_COLOR
|
lcProfileEntry("Settings", "StudCylinderColor", LC_RGBA(27, 42, 52, 255)), // LC_PROFILE_STUD_CYLINDER_COLOR
|
||||||
lcProfileEntry("Settings", "StudEdgeColor", LC_RGBA(0, 0, 0, 255)), // LC_PROFILE_STUD_EDGE_COLOR
|
lcProfileEntry("Settings", "PartEdgeColor", LC_RGBA(0, 0, 0, 255)), // LC_PROFILE_PART_EDGE_COLOR
|
||||||
lcProfileEntry("Settings", "BlackEdgeColor", LC_RGBA(255, 255, 255, 255)), // LC_PROFILE_BLACK_EDGE_COLOR
|
lcProfileEntry("Settings", "BlackEdgeColor", LC_RGBA(255, 255, 255, 255)), // LC_PROFILE_BLACK_EDGE_COLOR
|
||||||
lcProfileEntry("Settings", "DarkEdgeColor", LC_RGBA(27, 42, 52, 255)), // LC_PROFILE_DARK_EDGE_COLOR
|
lcProfileEntry("Settings", "DarkEdgeColor", LC_RGBA(27, 42, 52, 255)), // LC_PROFILE_DARK_EDGE_COLOR
|
||||||
lcProfileEntry("Settings", "PartEdgeContrast", 0.5f), // LC_PROFILE_PART_EDGE_CONTRAST
|
lcProfileEntry("Settings", "PartEdgeContrast", 0.5f), // LC_PROFILE_PART_EDGE_CONTRAST
|
||||||
|
|
|
@ -88,8 +88,8 @@ enum LC_PROFILE_KEY
|
||||||
LC_PROFILE_PREVIEW_VIEW_SPHERE_LOCATION,
|
LC_PROFILE_PREVIEW_VIEW_SPHERE_LOCATION,
|
||||||
LC_PROFILE_PREVIEW_DRAW_AXES,
|
LC_PROFILE_PREVIEW_DRAW_AXES,
|
||||||
|
|
||||||
LC_PROFILE_STUD_COLOR,
|
LC_PROFILE_STUD_CYLINDER_COLOR,
|
||||||
LC_PROFILE_STUD_EDGE_COLOR,
|
LC_PROFILE_PART_EDGE_COLOR,
|
||||||
LC_PROFILE_BLACK_EDGE_COLOR,
|
LC_PROFILE_BLACK_EDGE_COLOR,
|
||||||
LC_PROFILE_DARK_EDGE_COLOR,
|
LC_PROFILE_DARK_EDGE_COLOR,
|
||||||
LC_PROFILE_PART_EDGE_CONTRAST,
|
LC_PROFILE_PART_EDGE_CONTRAST,
|
||||||
|
|
|
@ -569,8 +569,8 @@ void lcQPreferencesDialog::AutomateEdgeColor()
|
||||||
lcAutomateEdgeColorDialog Dialog(this, sender() == ui->HighContrastButton);
|
lcAutomateEdgeColorDialog Dialog(this, sender() == ui->HighContrastButton);
|
||||||
if (Dialog.exec() == QDialog::Accepted)
|
if (Dialog.exec() == QDialog::Accepted)
|
||||||
{
|
{
|
||||||
mOptions->Preferences.mStudColor = Dialog.mStudColor;
|
mOptions->Preferences.mStudCylinderColor = Dialog.mStudCylinderColor;
|
||||||
mOptions->Preferences.mStudEdgeColor = Dialog.mStudEdgeColor;
|
mOptions->Preferences.mPartEdgeColor = Dialog.mPartEdgeColor;
|
||||||
mOptions->Preferences.mBlackEdgeColor = Dialog.mBlackEdgeColor;
|
mOptions->Preferences.mBlackEdgeColor = Dialog.mBlackEdgeColor;
|
||||||
mOptions->Preferences.mDarkEdgeColor = Dialog.mDarkEdgeColor;
|
mOptions->Preferences.mDarkEdgeColor = Dialog.mDarkEdgeColor;
|
||||||
mOptions->Preferences.mPartEdgeContrast = Dialog.mPartEdgeContrast;
|
mOptions->Preferences.mPartEdgeContrast = Dialog.mPartEdgeContrast;
|
||||||
|
|
Loading…
Add table
Reference in a new issue