diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index c552432..9f8c381 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -24,6 +24,7 @@ void MainWindow::loadFromRecipe(Recipe recipe){ setAuthorName("Click 'New' to get started."); } else { setRecipeName(recipe.getName()); + setAuthorName(recipe.getAuthor()); setInstruction(recipe.getInstruction()); setIngredients(recipe.getIngredients()); if (recipe.getImage().isNull()){ @@ -72,7 +73,11 @@ void MainWindow::setTags(vector tags){ } void MainWindow::setAuthorName(string name){ - ui->authorLabel->setText(QString::fromStdString(name)); + if (name.empty()){ + ui->authorLabel->setText(""); + } else { + ui->authorLabel->setText(QString::fromStdString("By "+name)); + } } void MainWindow::on_newButton_clicked(){ diff --git a/gui/mainwindow.ui b/gui/mainwindow.ui index 266c9b1..a80624e 100644 --- a/gui/mainwindow.ui +++ b/gui/mainwindow.ui @@ -373,7 +373,7 @@ font: "Noto Sans CJK KR"; - 20 + 16