diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2022-04-30 21:11:03 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2022-05-26 18:41:21 +0200 |
commit | 0ae26aded59f09b969592c2e600dba176954c619 (patch) | |
tree | 3e2b6beab3460464ef85ea62c8143023670f1c24 /src | |
parent | 63ed194365a6fe456c2150b83e24d8f801e49126 (diff) |
Improve recipe layout (two columns).
Diffstat (limited to 'src')
-rw-r--r-- | src/viewer.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/viewer.cc b/src/viewer.cc index 917b65d..e3c25be 100644 --- a/src/viewer.cc +++ b/src/viewer.cc @@ -41,7 +41,7 @@ Viewer::Viewer() layout()->addWidget(textEdit); textEdit->setReadOnly(true); //client.connectToHost("127.0.0.1"); - client.connectToHost("192.168.0.46"); + client.connectToHost("nanny"); } void Viewer::show(const Recipe& recipe) @@ -78,9 +78,9 @@ void Viewer::show(const Recipe& recipe) QString html = "<center><strong style=\"font-size:28px;\">" + QString::fromUtf8(recipe.title.data()) + "</strong></center><br/>" - "<p>" - "<img height=\"300\" src=\"data:image/png;base64," + image.toBase64() + "\"/>" - "</p>" + "<table>" + "<tr>" + "<td>" "<p>" + QString::fromUtf8(recipe.description.data()) + "</p>" "<p>" "Source: " + QString::fromUtf8(recipe.source.data()) + "<br/>" @@ -92,6 +92,12 @@ void Viewer::show(const Recipe& recipe) "</p>" "<h2>Ingredients</h2>" "<ul>" + ingredients + "</ul>" + "</td>" + "<td>" + "<img height=\"300\" src=\"data:image/png;base64," + image.toBase64() + "\"/>" + "</td>" + "</tr>" + "</table>" "<h2>Instructions</h2>" "<p>" + instructions + "</p>" ; |