Changeset View
Changeset View
Standalone View
Standalone View
generators/epub/converter.cpp
Show First 20 Lines • Show All 297 Lines • ▼ Show 20 Line(s) | 213 | do{ | |||
---|---|---|---|---|---|
298 | } | 298 | } | ||
299 | 299 | | |||
300 | // HACK BEGIN | 300 | // HACK BEGIN | ||
301 | qApp->setPalette(p); | 301 | qApp->setPalette(p); | ||
302 | // HACK END | 302 | // HACK END | ||
303 | 303 | | |||
304 | QTextBlock before; | 304 | QTextBlock before; | ||
305 | if(firstPage) { | 305 | if(firstPage) { | ||
306 | // preHtml & postHtml make it possible to have a margin around the content of the page | 306 | mTextDocument->setHtml(htmlContent); | ||
307 | const QString preHtml = QString::fromLatin1("<html><head></head><body>" | | |||
308 | "<table style=\"-qt-table-type: root; margin-top:%1px; margin-bottom:%1px; margin-left:%1px; margin-right:%1px;\">" | | |||
309 | "<tr>" | | |||
310 | "<td style=\"border: none;\">").arg(mTextDocument->padding); | | |||
311 | const QString postHtml = QStringLiteral("</tr></table></body></html>"); | | |||
312 | mTextDocument->setHtml(preHtml + htmlContent + postHtml); | | |||
313 | firstPage = false; | 307 | firstPage = false; | ||
314 | before = mTextDocument->begin(); | 308 | before = mTextDocument->begin(); | ||
315 | } else { | 309 | } else { | ||
316 | before = _cursor->block(); | 310 | before = _cursor->block(); | ||
317 | _cursor->insertHtml(htmlContent); | 311 | _cursor->insertHtml(htmlContent); | ||
318 | } | 312 | } | ||
319 | // HACK BEGIN | 313 | // HACK BEGIN | ||
320 | qApp->setPalette(orig); | 314 | qApp->setPalette(orig); | ||
▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines |