--- a/src/EditRecipe.cpp Thu Mar 31 23:10:57 2022 +0200 +++ b/src/EditRecipe.cpp Fri Apr 01 14:58:57 2022 +0200 @@ -34,6 +34,12 @@ ui->typeEdit->addItem(tr("Partial Mash")); ui->typeEdit->addItem(tr("All Grain")); + ui->color_methodEdit->addItem("Morey"); + ui->color_methodEdit->addItem("Mosher"); + ui->color_methodEdit->addItem("Daniels"); + ui->color_methodEdit->addItem("Halberstadt"); + ui->color_methodEdit->addItem("Naudts"); + if (id >= 0) { query.prepare("SELECT * FROM recipes WHERE record = :recno"); query.bindValue(":recno", id); @@ -87,17 +93,13 @@ ui->est_colorEdit->setValue(query.value(31).toDouble()); QColor color = Utils::ebc_to_color(query.value(31).toInt()); + ui->est_colorEdit->setStyleSheet(Utils::ebc_to_style(query.value(31).toInt())); ui->est_colorGlass->setColor(color); ui->est_colorShow->setPrecision(0); - ui->est_colorShow->setMarkerTextIsValue(true); + ui->est_colorShow->setMarkerTextIsValue(false); ui->est_colorShow->setRange(query.value(15).toDouble(), query.value(16).toDouble()); ui->est_colorShow->setValue(query.value(31).toDouble()); - ui->color_methodEdit->addItem("Morey"); - ui->color_methodEdit->addItem("Mosher"); - ui->color_methodEdit->addItem("Daniels"); - ui->color_methodEdit->addItem("Halberstadt"); - ui->color_methodEdit->addItem("Naudts"); ui->color_methodEdit->setCurrentIndex(query.value(32).toInt()); // 33 est_ibu @@ -291,7 +293,7 @@ void EditRecipe::on_quitButton_clicked() { if (this->textIsChanged) { - int rc = QMessageBox::warning(this, tr("Recipe changed"), tr("The ingredient has been modified. Save changes?"), + int rc = QMessageBox::warning(this, tr("Recipe changed"), tr("The recipe has been modified. Save changes?"), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save); switch (rc) { case QMessageBox::Save: