Commit 623cbfc0 authored by Laurent Montel's avatar Laurent Montel
Browse files

clean up. Start to move code to messageviewerrenderer

parent cd3fb6e5
......@@ -82,9 +82,7 @@ static const struct {
}
CSSHelperBase::CSSHelperBase(const QPaintDevice *pd)
: mRecycleQuoteColors(false)
, mShrinkQuotes(false)
, mPaintDevice(pd)
: mPaintDevice(pd)
{
recalculatePGPColors();
const QString imgSrcShow = QStringLiteral("quicklistClosed.png");
......@@ -442,7 +440,7 @@ QString CSSHelperBase::defaultScreenHeaderFont() const
const QString headerFont = QStringLiteral(" font-family: \"%1\" ! important;\n"
" font-size: %2px ! important;\n")
.arg(mBodyFont.family())
.arg(pointsToPixel(this->mPaintDevice, mBodyFont.pointSize()));
.arg(pointsToPixel(mPaintDevice, mBodyFont.pointSize()));
return headerFont;
}
......
......@@ -110,8 +110,8 @@ protected:
QFont mFixedPrintFont;
QFont mQuoteFont;
QColor mQuoteColor[3];
bool mRecycleQuoteColors;
bool mShrinkQuotes;
bool mRecycleQuoteColors = false;
bool mShrinkQuotes = false;
bool mUseBrowserColor = false;
QColor mForegroundColor;
QColor mLinkColor;
......
......@@ -21,7 +21,7 @@
*/
#include "messageviewerrenderer.h"
#include "viewer/csshelper.h"
using namespace MessageViewer;
MessageViewerRenderer::MessageViewerRenderer()
{
......@@ -30,5 +30,10 @@ MessageViewerRenderer::MessageViewerRenderer()
MessageViewerRenderer::~MessageViewerRenderer()
{
delete mCSSHelper;
}
CSSHelper *MessageViewerRenderer::cssHelper() const
{
return mCSSHelper;
}
......@@ -26,11 +26,17 @@
#include "messageviewer_private_export.h"
namespace MessageViewer {
class CSSHelper;
class MESSAGEVIEWER_TESTS_EXPORT MessageViewerRenderer
{
public:
MessageViewerRenderer();
~MessageViewerRenderer();
CSSHelper *cssHelper() const;
private:
CSSHelper *mCSSHelper = nullptr;
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment