diff --git a/src/gui/HtmlExporter.cpp b/src/gui/HtmlExporter.cpp index 70249ed2..65490946 100644 --- a/src/gui/HtmlExporter.cpp +++ b/src/gui/HtmlExporter.cpp @@ -85,15 +85,6 @@ namespace item.append(""); } - const auto& n = entry.notes(); - if (!n.isEmpty()) { - item.append(""); - item.append(QObject::tr("Notes")); - item.append(""); - item.append(entry.notes().toHtmlEscaped().replace("\n", "
")); - item.append(""); - } - // Now add the attributes (if there are any) const auto* const attr = entry.attributes(); if (attr && !attr->customKeys().isEmpty()) { @@ -105,6 +96,15 @@ namespace item.append(""); } } + + const auto& n = entry.notes(); + if (!n.isEmpty()) { + item.append(""); + item.append(QObject::tr("Notes")); + item.append(""); + item.append(entry.notes().toHtmlEscaped().replace("\n", "
")); + item.append(""); + } return item; } } // namespace @@ -150,15 +150,18 @@ bool HtmlExporter::exportDatabase(QIODevice* device, "h3 " "{ margin-left: 2em; }" "table " - "{ margin-left: 4em; } " + "{ margin-left: 1em; } " + "caption " + "{ text-align: left; font-weight: bold; font-size: 150%; border-bottom: .15em solid " + "#4ca; margin-bottom: .5em;} " "th, td " "{ text-align: left; vertical-align: top; padding: 1px; }" "th " - "{ min-width: 5em; width: 20%; } " + "{ min-width: 7em; width: 15%; } " ".username, .password, .url, .attr " "{ font-size: larger; font-family: monospace; } " ".notes " - "{ font-size: medium; } " + "{ font-size: small; } " "" "\n" "" @@ -231,7 +234,7 @@ bool HtmlExporter::writeGroup(QIODevice& device, const Group& group, QString pat } // Begin the table for the entries in this group - auto table = QString(""); + auto table = QString("
"); auto entries = group.entries(); if (sorted) { @@ -252,10 +255,11 @@ bool HtmlExporter::writeGroup(QIODevice& device, const Group& group, QString pat // icon and entry title ... table += ""; table += ""; - table += ""; + auto caption = ""; // ... then the right side with the data fields - table += ""; + table += + ""; table += ""; }
" + PixmapToHTML(Icons::entryIconPixmap(entry, IconSize::Medium)) + "

" + entry->title().toHtmlEscaped() + "

" + entry->title().toHtmlEscaped() + "
" + formatted_entry + "
" + caption + formatted_entry + "